[PR #3020] [CLOSED] Handle pipelines with mixed samples counts #3153

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3020
Author: @mikusp
Created: 5/31/2025
Status: Closed

Base: mainHead: mixed_samples


📝 Commits (1)

  • 9817502 Handle pipelines with mixed samples counts

📊 Changes

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

View changed files

📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp (+8 -1)
📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.h (+3 -1)
📝 src/video_core/renderer_vulkan/vk_instance.cpp (+2 -0)
📝 src/video_core/renderer_vulkan/vk_instance.h (+8 -0)
📝 src/video_core/renderer_vulkan/vk_pipeline_cache.cpp (+8 -1)

📄 Description

Fixes a Device lost error encountered in WIPEOUT: Omega Collection and HEAVY RAIN:

[Render.Vulkan] <Error> vk_platform.cpp:56 DebugUtilsCallback: VUID-vkCmdDrawIndexed-multisampledRenderToSingleSampled-07285: Validation Error: [ VUID-vkCmdDrawIndexed-multisampledRenderToSingleSampled-07285 ] Object 0: handle = 0xfa17400, name = CommandPool: Command Buffer 0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xe9b2ee0000000094, name = Graphics Pipeline fs_0x000000004f6cc41b,vs_0x000000002012d5ea, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0xf4b969ec | vkCmdDrawIndexed(): Color attachment (0) sample count (VK_SAMPLE_COUNT_1_BIT) must match corresponding VkPipelineMultisampleStateCreateInfo sample count (VK_SAMPLE_COUNT_4_BIT).
The Vulkan spec states: If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the multisampledRenderToSingleSampled feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCount parameter greater than 0, then each element of the VkRenderingInfo::pColorAttachments array with a imageView not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of rasterizationSamples for the bound graphics pipeline (https://vulkan.lunarg.com/doc/view/1.4.304.1/windows/antora/spec/latest/chapters/drawing.html#VUID-vkCmdDrawIndexed-multisampledRenderToSingleSampled-07285)

According to gpuinfo, multisampledRenderToSingleSampled is supported by only a handful of mobile GPUs, while the other two are supported by most modern cards from the respective company.


🔄 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/3020 **Author:** [@mikusp](https://github.com/mikusp) **Created:** 5/31/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `mixed_samples` --- ### 📝 Commits (1) - [`9817502`](https://github.com/shadps4-emu/shadPS4/commit/9817502dcbaf947f7d99dc59708df2733b7d8f62) Handle pipelines with mixed samples counts ### 📊 Changes **5 files changed** (+29 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp` (+8 -1) 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.h` (+3 -1) 📝 `src/video_core/renderer_vulkan/vk_instance.cpp` (+2 -0) 📝 `src/video_core/renderer_vulkan/vk_instance.h` (+8 -0) 📝 `src/video_core/renderer_vulkan/vk_pipeline_cache.cpp` (+8 -1) </details> ### 📄 Description Fixes a Device lost error encountered in WIPEOUT: Omega Collection and HEAVY RAIN: ``` [Render.Vulkan] <Error> vk_platform.cpp:56 DebugUtilsCallback: VUID-vkCmdDrawIndexed-multisampledRenderToSingleSampled-07285: Validation Error: [ VUID-vkCmdDrawIndexed-multisampledRenderToSingleSampled-07285 ] Object 0: handle = 0xfa17400, name = CommandPool: Command Buffer 0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xe9b2ee0000000094, name = Graphics Pipeline fs_0x000000004f6cc41b,vs_0x000000002012d5ea, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0xf4b969ec | vkCmdDrawIndexed(): Color attachment (0) sample count (VK_SAMPLE_COUNT_1_BIT) must match corresponding VkPipelineMultisampleStateCreateInfo sample count (VK_SAMPLE_COUNT_4_BIT). The Vulkan spec states: If the bound pipeline was created without a VkAttachmentSampleCountInfoAMD or VkAttachmentSampleCountInfoNV structure, and the multisampledRenderToSingleSampled feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering with a VkRenderingInfo::colorAttachmentCount parameter greater than 0, then each element of the VkRenderingInfo::pColorAttachments array with a imageView not equal to VK_NULL_HANDLE must have been created with a sample count equal to the value of rasterizationSamples for the bound graphics pipeline (https://vulkan.lunarg.com/doc/view/1.4.304.1/windows/antora/spec/latest/chapters/drawing.html#VUID-vkCmdDrawIndexed-multisampledRenderToSingleSampled-07285) ``` According to gpuinfo, `multisampledRenderToSingleSampled` is supported by only a handful of mobile GPUs, while the other two are supported by most modern cards from the respective company. --- <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:38 +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#3153
No description provided.