Skip to content

Runtime: OPTIONS19 no-output sample counts are 1/4/8/16 (no 2x) — fixes the red d3d12_vulkan_device_test on AMD - #855

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
AlxcBTW:fix-options19-no-output-counts
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
AlxcBTW:fix-options19-no-output-counts

Conversation

@AlxcBTW

@AlxcBTW AlxcBTW commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

What and why

This is a fix on main (D3D-86 follow-up). ctest is red on AMD since CheckFeatureSupport(OPTIONS19) landed: d3d12_vulkan_device_test fails options_mismatches against every host adapter.

OPTIONS19.SupportedSampleCountsWithNoOutputs: ours 0xf not subset of host 0x1d

SupportedSampleCountsWithNoOutputs was taken from VkPhysicalDeviceLimits::framebufferNoAttachmentsSampleCounts, masked to 1..32. 2x is on every GPU here, but it isn't a D3D12 no-output count.

  • Spec: the no-output counts are the target-independent-rasterization ones. D3D12_RASTERIZER_DESC::ForcedSampleCount is "0, 1, 4, 8, and optionally 16". DirectX-Specs VulkanOn12.md, "Sample-frequency MSAA with no render targets bound", requires a driver to report at least 0b11101, which is 1, 4, 8 and 16.
  • The hosts here agree: WARP, the Radeon 880M and the RTX 5070 all report 0x1d.

The layer now intersects the Vulkan mask with 1 | 4 | 8 | 16. Each count it reports is still one the GPU can rasterize with no attachments, so on the Radeon 880M, whose Vulkan mask has no 16x, it reports 0xd.

Tested

AMD Radeon 880M (26.11.2) and NVIDIA RTX 5070 Laptop (617.42), Windows 11, MSVC 17.14:

d3d12_vulkan_device_test host WARP host Radeon host NVIDIA
Vulkan Radeon 880M, before (main) exit 1 (0xf vs 0x1d) exit 1 exit 1
Vulkan Radeon 880M, after exit 0 exit 0 exit 0
Vulkan RTX 5070, before / after 0 / 0 0 / 0 0 / 0

ctest passes 32/32 on both GPUs after the change; before it, the 880M failed 1.

@JavierBlanco23: #775 carries the same lines, so it will need this mask, or the merge will bring 2x back.

AI-assisted (Claude Code).

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (No translator change.)

🤖 Generated with Claude Code

…6, 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 <noreply@anthropic.com>
@bobcatchris

Copy link
Copy Markdown
Contributor

Verified on a second RDNA3 driver — a discrete RX 7900 XTX rather than the 880M, and AMD 26.10.1 rather than 26.11.2.

GPU AMD Radeon RX 7900 XTX (RDNA3, gfx1100), AMD proprietary 26.10.1 (LLPC), Vulkan 1.4.359
OS Windows 11 x64 build 26200, MSVC 19.39, Windows SDK 10.0.26100, Vulkan SDK 1.4.341.1
Head tested 462fc35, built as-is in a clean worktree

d3d12_vulkan_device_test, with and without LEONIDA_VK_VALIDATION=1: exit 0

CheckFeatureSupport options (AMD Radeon RX 7900 XTX): 15 feature queries compared
(0 host-unsupported skipped), MSAA64KB=1, NoOutputsSamples=0xd, MaxViewHeap=1000000, 0 mismatches

This card reports 0xd (1, 4, 8): its Vulkan framebufferNoAttachmentsSampleCounts is exactly 1/2/4/8, so there is no 16× to keep and 2× is dropped by your mask — a subset of the host's 0x1d, which is the direction the assertion needs.

Full ctest here: 32/32 passed with validation (gameinput disabled, not run), and 100% tests passed, 0 tests failed out of 32 without it. Before the change this card was 31/32 on main with 0xf not subset of host 0x1d (#854).

Your #775 note is right, and I checked it: d3d-86-options at 7463359 still has the old 1|2|4|8|16|32 mask at runtime/shims/d3d12_vulkan_device.cpp:1100-1102, so merging that PR without it brings 0xf back and re-reds this test on AMD. Flagged there too.

AI-assisted.

@Gabzinnn12

Copy link
Copy Markdown

Tested 462fc35 on AMD Radeon RX 7600 (RDNA3, gfx1102), driver 32.0.32029.2010, Windows 11 Pro build 26300, MSVC 19.44, Vulkan SDK 1.4.363.0: pass.

  • Before, on main 4a36bb1: d3d12_vulkan_device_test fails with OPTIONS19.SupportedSampleCountsWithNoOutputs: ours 0xf not subset of host 0x1d and line 1765: options_mismatches == 0, the same failure d3d12_vulkan_device: OPTIONS19.SupportedSampleCountsWithNoOutputs 0xf vs host 0x1d on AMD (RX 7900 XTX, Windows) #854 reports on an RX 7900 XTX.
  • With this PR: ctest 32/32, and d3d12_vulkan_device_test exits 0 both without validation and with LEONIDA_VK_VALIDATION=1 VK_LAYER_VALIDATE_SYNC=1 (implicit layers disabled): NoOutputsSamples=0xd, 0 mismatches over 15 feature queries. In the validation run: copy comparison 0 of 69 differ, resolve 60/60 matched, no validation errors.
  • The other D3D12 GPU tests under LEONIDA_VK_VALIDATION=1 (vk_command_replay, d3d12_com, descriptor, uav_clear, method_variants, sampler2, clear, typeless_rtv, resource_desc): all exit 0.
  • 16x stays unreported here: main's answer before the mask was 0xf, so this driver's framebufferNoAttachmentsSampleCounts has no 16x bit; 0xd is a subset of the host's 0x1d.
  • Doc note: docs/d3d12_vulkan.md (lines 892–900) still says OPTIONS19 maps SupportedSampleCountsWithNoOutputs straight from framebufferNoAttachmentsSampleCounts and quotes 0x1f on the RTX 5080; with this mask that measurement would read 0x1d.

Synthetic tests only, no game files. AI-assisted (Claude Code, reviewed with Codex); I reviewed the diff and the runs.

@quackottu quackottu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 462fc35 on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1 and LEONIDA_D3D12=vulkan: pass

  • ctest -C RelWithDebInfo: 100% tests passed, 0 tests failed out of 32
  • 32 test programs in the build pass with 0 validation errors
  • d3d12_clear_test fails (R8G8B8A8_UNORM/SNORM 0.5 ties and a D16 clear byte differ from WARP) exactly as on main 4a36bb1 here, so not from this PR; #521 addresses it

Implicit Vulkan layers (overlays) were off through an empty VK_IMPLICIT_LAYER_PATH.

@TheHoracio

Copy link
Copy Markdown
Contributor

Second RDNA3 card: pass. Tested 462fc35 on an AMD Radeon RX 7800 XT (Navi 32), driver 26.10.1 (32.0.32015.7029), Windows 11 Pro (26300), MSVC 14.44, Ninja RelWithDebInfo, LEONIDA_VK_VALIDATION=1. d3d12_vulkan_device_test reports NoOutputsSamples=0xd with 0 mismatches (on main 4a36bb1 it fails with ours 0xf not subset of host 0x1d, as in #854), and ctest is 32/32. AI-assisted.

@ItsNotRexed
ItsNotRexed merged commit 91d9387 into ItsNotRexed:main Nov 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants