protonscr

Vulkan Validation errors with test_multisample_rendering

vkd3dclosed
HansKristian-Work/vkd3d-proton#2369 · opened 2025-03-03 by hakzsam · updated 2025-03-10 · 3 comments · github
Hhakzsam 2025-03-03 github
$ VKD3D_TEST_FILTER=test_multisample_rendering ./build/tests/d3d12 
d3d12:676: Driver name: radv, driver info: Mesa 25.1.0-devel (git-99a7dc3fc4).
d3d12: ======== test_multisample_rendering begin ========
VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285(ERROR / SPEC): msgNum: 2132579967 - Validation Error: [ VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285 ] Objects: VkCommandBuffer 0x5ba5ad809f70, VkPipeline 0x1dc49b00000000b2 | MessageID = 0x7f1c967f
vkCmdDraw(): Color attachment (0) sample count (VK_SAMPLE_COUNT_4_BIT) must match corresponding VkPipelineMultisampleStateCreateInfo sample count (VK_SAMPLE_COUNT_1_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://docs.vulkan.org/spec/latest/chapters/drawing.html#VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285)
    Objects: 2
        [0] 0x5ba5ad809f70, type: 6, name: NULL
        [1] 0x1dc49b00000000b2, type: 19, name: NULL
d3d12: ======== test_multisample_rendering end ==========
d3d12: 103 tests executed (0 failures, 0 successful todo, 0 skipped, 0 todo, 0 bugs).

Tested with VVL (8496ed502).

Ddoitsujin maintainer 2025-03-03 github

This is somewhat intentional; some games don't set up the sample count in their pipelines correctly (iirc World of Warcraft was pretty bad in that regard), and being spec-compliant here would force us to either late-compile pipelines in those games (i.e. stutter horribly), or unconditionally use dynamic rasterization samples (i.e. invalidate all fossilize dbs and potentially sacrifice perf for well-behaved games).

Is this causing any real issues right now?

HHansKristian-Work maintainer 2025-03-07 github
Hhakzsam 2025-03-07 github

Yeah, feel free to close my VVL tickets. Thanks for the work!