[PR #2871] [MERGED] vk_presenter: Use correct format and swizzle for output frame image view. #3043

Closed
opened 2026-02-27 22:02:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2871
Author: @squidbus
Created: 5/2/2025
Status: Merged
Merged: 5/2/2025
Merged by: @squidbus

Base: mainHead: frame-fix


📝 Commits (1)

  • 5a58ec1 vk_presenter: Use correct format for output frame image and view.

📊 Changes

3 files changed (+29 additions, -8 deletions)

View changed files

📝 src/video_core/renderer_vulkan/vk_presenter.cpp (+20 -2)
📝 src/video_core/renderer_vulkan/vk_presenter.h (+5 -3)
📝 src/video_core/texture_cache/image_info.cpp (+4 -3)

📄 Description

Video out frames can have some versions of formats that are not present for other images, for example BGRA Srgb instead of RGBA Srgb. In cases like this the texture cache will likely contain the RGBA version, especially if exact format was requested by a resolve operation. To handle this, use Vulkan formats for video out frames consistent with other supported GPU formats, and perform any required swizzle in the frame image view. This basically reverses the swizzle that games do when rendering to BGRA for the final frame.

Should fix inverted colors in several games: https://github.com/shadps4-emu/shadPS4/issues/2650


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/2871 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 5/2/2025 **Status:** ✅ Merged **Merged:** 5/2/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `frame-fix` --- ### 📝 Commits (1) - [`5a58ec1`](https://github.com/shadps4-emu/shadPS4/commit/5a58ec1569337d1ea8bd1794f8baaa2f46dcd760) vk_presenter: Use correct format for output frame image and view. ### 📊 Changes **3 files changed** (+29 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_presenter.cpp` (+20 -2) 📝 `src/video_core/renderer_vulkan/vk_presenter.h` (+5 -3) 📝 `src/video_core/texture_cache/image_info.cpp` (+4 -3) </details> ### 📄 Description Video out frames can have some versions of formats that are not present for other images, for example BGRA Srgb instead of RGBA Srgb. In cases like this the texture cache will likely contain the RGBA version, especially if exact format was requested by a resolve operation. To handle this, use Vulkan formats for video out frames consistent with other supported GPU formats, and perform any required swizzle in the frame image view. This basically reverses the swizzle that games do when rendering to BGRA for the final frame. Should fix inverted colors in several games: https://github.com/shadps4-emu/shadPS4/issues/2650 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:02:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3043
No description provided.