From 462fc35e9d7b385d34aebcdead8055155a94cc80 Mon Sep 17 00:00:00 2001 From: AlxcBTW <187763517+AlxcBTW@users.noreply.github.com> Date: Sun, 22 Nov 2026 04:53:29 +0100 Subject: [PATCH] Runtime: OPTIONS19 no-output sample counts are the TIR counts 1/4/8/16, not 2x SupportedSampleCountsWithNoOutputs was framebufferNoAttachmentsSampleCounts masked to 1..32. Every GPU here reports 2x there, but D3D12's no-output counts are the target-independent-rasterization ones (ForcedSampleCount 0, 1, 4, 8, 16; DirectX-Specs VulkanOn12.md: a driver reports at least 0b11101), and the PC runtime's hosts report 0x1d. On the Radeon 880M the layer answered 0xf, not a subset of the host's 0x1d, so d3d12_vulkan_device_test failed options_mismatches against every host. Co-Authored-By: Claude Opus 5.5 --- runtime/shims/d3d12_vulkan_device.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/shims/d3d12_vulkan_device.cpp b/runtime/shims/d3d12_vulkan_device.cpp index f07876055..a36f4eebf 100644 --- a/runtime/shims/d3d12_vulkan_device.cpp +++ b/runtime/shims/d3d12_vulkan_device.cpp @@ -1240,9 +1240,13 @@ class Device final state_.info.max_push_constants_size = props.limits.maxPushConstantsSize; state_.info.push_constants_need_fallback = (state_.info.max_push_constants_size < 144); } + // The counts D3D12 offers with no outputs are the target-independent-rasterization ones: 1, 4, 8 + // and 16 (ForcedSampleCount is 0, 1, 4, 8 or 16; DirectX-Specs VulkanOn12.md "Sample-frequency MSAA + // with no render targets bound": a driver reports at least 0b11101). 2x is not one of them, though + // framebufferNoAttachmentsSampleCounts has it on every GPU here; reporting it would offer a count the + // PC runtime refuses (its hosts report 0x1d). constexpr VkSampleCountFlags kD3D12SampleCounts = - VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT | - VK_SAMPLE_COUNT_8_BIT | VK_SAMPLE_COUNT_16_BIT | VK_SAMPLE_COUNT_32_BIT; + VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_8_BIT | VK_SAMPLE_COUNT_16_BIT; state_.no_output_sample_counts = static_cast(props.limits.framebufferNoAttachmentsSampleCounts & kD3D12SampleCounts); }