WIP: [vk, msaa] Rewrite MSAA texture upload/download handling #133

Draft
MrPurple666 wants to merge 1 commit from MrPurple666/eden:msaa-new into master
Owner

This pull request significantly improves the robustness and flexibility of MSAA texture handling in the Vulkan backend. It replaces the previous MSAACopyPass-based method, which relied on limited and unstable logic, with an explicit and well-defined blit path that leverages Vulkan’s transfer and layout semantics. During texture uploads, MSAA images now receive data via an intermediate non-MSAA image followed by a vkCmdBlitImage operation, ensuring compliance with Vulkan’s constraints and providing a generalized solution for various image formats. Likewise, for downloads, the process is reversed: MSAA images are blitted into a temporary non-MSAA image before copying to the target buffer. Layout transitions and synchronization are handled with explicit barriers, enhancing clarity and correctness. This approach not only improves reliability and maintainability but also sets the foundation for supporting more complex formats like depth/stencil in future work. Furthermore, a minor change ensures that images flagged for storage use are initialized with a standard RGBA swizzle to avoid undefined shader behavior.

PS: Tested on Android only.

This pull request significantly improves the robustness and flexibility of MSAA texture handling in the Vulkan backend. It replaces the previous MSAACopyPass-based method, which relied on limited and unstable logic, with an explicit and well-defined blit path that leverages Vulkan’s transfer and layout semantics. During texture uploads, MSAA images now receive data via an intermediate non-MSAA image followed by a vkCmdBlitImage operation, ensuring compliance with Vulkan’s constraints and providing a generalized solution for various image formats. Likewise, for downloads, the process is reversed: MSAA images are blitted into a temporary non-MSAA image before copying to the target buffer. Layout transitions and synchronization are handled with explicit barriers, enhancing clarity and correctness. This approach not only improves reliability and maintainability but also sets the foundation for supporting more complex formats like depth/stencil in future work. Furthermore, a minor change ensures that images flagged for storage use are initialized with a standard RGBA swizzle to avoid undefined shader behavior. PS: Tested on Android only.
Shinmegumi force-pushed msaa-new from 9be971f59b
All checks were successful
eden-license / license-header (pull_request) Successful in 33s
to 7672704731
Some checks failed
eden-license / license-header (pull_request) Has been cancelled
2025-07-26 23:21:12 +02:00
Compare
MaranBr force-pushed msaa-new from 7672704731
Some checks failed
eden-license / license-header (pull_request) Has been cancelled
to e8c49be369
Some checks failed
eden-license / license-header (pull_request) Failing after 29s
2025-07-27 02:26:24 +02:00
Compare
Shinmegumi force-pushed msaa-new from e8c49be369
Some checks failed
eden-license / license-header (pull_request) Failing after 29s
to e12a500720
Some checks failed
eden-license / license-header (pull_request) Has been cancelled
2025-08-02 00:11:15 +02:00
Compare
crueter force-pushed msaa-new from e12a500720
Some checks failed
eden-license / license-header (pull_request) Has been cancelled
to 55c1b9ddcd
All checks were successful
eden-license / license-header (pull_request) Successful in 14s
2025-08-03 01:57:37 +02:00
Compare
crueter force-pushed msaa-new from 55c1b9ddcd
All checks were successful
eden-license / license-header (pull_request) Successful in 14s
to f6b227ebfd
Some checks failed
eden-license / license-header (pull_request) Successful in 37s
build.yml / vk_texture_cache: Rewrite MSAA handling with blits and proper barriers (pull_request) Failing after 0s
trigger_release.yml / vk_texture_cache: Rewrite MSAA handling with blits and proper barriers (pull_request) Failing after 0s
2025-08-04 23:56:58 +02:00
Compare
Member

Can you sync it?

Can you sync it?
DraVee changed title from [vk, msaa] Rewrite MSAA texture upload/download handling to WIP: [vk, msaa] Rewrite MSAA texture upload/download handling 2025-11-27 03:08:38 +01:00
Some checks failed
eden-license / license-header (pull_request) Successful in 37s
Required
Details
build.yml / vk_texture_cache: Rewrite MSAA handling with blits and proper barriers (pull_request) Failing after 0s
trigger_release.yml / vk_texture_cache: Rewrite MSAA handling with blits and proper barriers (pull_request) Failing after 0s
This pull request has changes conflicting with the target branch.
  • src/video_core/renderer_vulkan/vk_texture_cache.cpp
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u msaa-new:MrPurple666-msaa-new
git switch MrPurple666-msaa-new
Sign in to join this conversation.
No description provided.