d3d12_pso_validation_test: compare the DYNAMIC_* PSO flags with the host only where it reports them (TEST-WIN10-PSO-FLAGS) #967

Closed
Snooozs wants to merge 1 commit from upstream-pr/967 into main
Snooozs commented 2026-11-24 16:00:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Snooozs on 2026-11-24T16:00:35Z.


Claimed in the coordination issue as: TEST-WIN10-PSO-FLAGS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7136932062)

What and why

d3d12_pso_validation fails on Windows 10 22H2 (19045):

FAIL [gfx: Flags=DYNAMIC_DEPTH_BIAS]: layer 0x00000000 != host NVIDIA GeForce RTX 5060 Ti 0x80070057

The test compares the layer with the host's D3D12. Windows 10's in-box runtime refuses D3D12_PIPELINE_STATE_FLAG_DYNAMIC_DEPTH_BIAS and reports OPTIONS16.DynamicDepthBiasSupported and OPTIONS15.DynamicIndexBufferStripCutSupported as FALSE. With only the depth-bias case gated, DYNAMIC_INDEX_BUFFER_STRIP_CUT fails the same way next, so both are covered.

Test-only change: each host records the two feature answers (a failed query counts as unsupported). The four DYNAMIC_* cases (graphics and compute) compare with a host only where it reports the feature, and print a SKIP host comparison ... line otherwise. The layer-side expectation (S_OK) still runs everywhere, and the other cases are unchanged.

This carries on my old pull request 8540, which has no old-pr branch.

Not changed here: the layer reports both features FALSE (runtime/shims/d3d12_vulkan_device.cpp:7749, :7756) but accepts both flags (kKnownPipelineStateFlags = 0xF, :2945). Whether it should refuse them or report the features is a separate decision.

Tested

Windows 10 Pro 22H2 (10.0.19045), VS 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0, hosts: NVIDIA GeForce RTX 5060 Ti and WARP; ctest -R "^d3d12_pso_validation$":

  • main 1504c1af6: fails with the line above
  • with this change: PASS (60 layer checks, 92 host comparisons across 2 host device(s)), with SKIP lines for both features on both hosts
  • python -I scripts/check_no_game_data.py runtime/test/d3d12_pso_validation_test.cpp: clean

I have not run it on a Windows 11 host that reports the features; nothing is skipped there by construction.

GPUs tested: NVIDIA GeForce RTX 5060 Ti, driver 621.01 (32.0.16.2101), Windows 10 22H2

AI-assisted: yes. Claude Code (a Haiku 5.5 subagent wrote the change, Claude Opus 5.5 reviewed it and reran the test).

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • 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. (n/a: no translator rule)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5475719036 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/967). Originally posted by [Snooozs](https://github.com/Snooozs) on 2026-11-24T16:00:35Z. --- Claimed in the coordination issue as: TEST-WIN10-PSO-FLAGS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7136932062) ### What and why `d3d12_pso_validation` fails on Windows 10 22H2 (19045): ``` FAIL [gfx: Flags=DYNAMIC_DEPTH_BIAS]: layer 0x00000000 != host NVIDIA GeForce RTX 5060 Ti 0x80070057 ``` The test compares the layer with the host's D3D12. Windows 10's in-box runtime refuses `D3D12_PIPELINE_STATE_FLAG_DYNAMIC_DEPTH_BIAS` and reports `OPTIONS16.DynamicDepthBiasSupported` and `OPTIONS15.DynamicIndexBufferStripCutSupported` as FALSE. With only the depth-bias case gated, `DYNAMIC_INDEX_BUFFER_STRIP_CUT` fails the same way next, so both are covered. Test-only change: each host records the two feature answers (a failed query counts as unsupported). The four `DYNAMIC_*` cases (graphics and compute) compare with a host only where it reports the feature, and print a `SKIP host comparison ...` line otherwise. The layer-side expectation (`S_OK`) still runs everywhere, and the other cases are unchanged. This carries on my old pull request 8540, which has no `old-pr` branch. Not changed here: the layer reports both features FALSE (`runtime/shims/d3d12_vulkan_device.cpp:7749`, `:7756`) but accepts both flags (`kKnownPipelineStateFlags = 0xF`, `:2945`). Whether it should refuse them or report the features is a separate decision. ### Tested Windows 10 Pro 22H2 (10.0.19045), VS 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0, hosts: NVIDIA GeForce RTX 5060 Ti and WARP; `ctest -R "^d3d12_pso_validation$"`: - `main` 1504c1af6: fails with the line above - with this change: `PASS (60 layer checks, 92 host comparisons across 2 host device(s))`, with SKIP lines for both features on both hosts - `python -I scripts/check_no_game_data.py runtime/test/d3d12_pso_validation_test.cpp`: clean I have not run it on a Windows 11 host that reports the features; nothing is skipped there by construction. GPUs tested: NVIDIA GeForce RTX 5060 Ti, driver 621.01 (32.0.16.2101), Windows 10 22H2 AI-assisted: yes. Claude Code (a Haiku 5.5 subagent wrote the change, Claude Opus 5.5 reviewed it and reran the test). ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator rule) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
robot00f commented 2026-11-24 22:24:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by robot00f on 2026-11-24T22:24:55Z.


Second, independent measurement of the same failure on another Windows 10 machine, and a check of this change on it.

Host: Windows 10 Pro 19045, NVIDIA GPU (Pascal class, 4 GB), driver 582.28, in-box d3d12.dll 10.0.19041.4355. The branch is based on an older main; git cherry-pick -n d72e8b7f onto 6b1bc450 (current main) applies cleanly. I compiled only d3d12_pso_validation_test.cpp with the defines, flags and include paths of the existing RelWithDebInfo build.ninja entry and linked it against the current main libraries into a separate executable.

  • main: fails 3/3, deterministic, FAIL [gfx: Flags=DYNAMIC_DEPTH_BIAS]: layer 0x00000000 != host NVIDIA GeForce GTX 1050 Ti 0x80070057. On this host DYNAMIC_INDEX_BUFFER_STRIP_CUT does not fail only because EXPECT keeps going -- gating just the depth-bias case would have surfaced it next, as you wrote.
  • with the change: passes 3/3, PASS (60 layer checks, 92 host comparisons across 2 host device(s)), with the OPTIONS16/OPTIONS15 SKIP lines on the GTX 1050 Ti and on WARP. 60 layer checks is the same count as the failing run, so nothing was dropped on the layer side.

CheckFeatureSupport answers FALSE for both features on the hardware adapter here too, and WARP agrees, so the gate keys on the runtime, not on one vendor. python -I scripts/check_no_game_data.py on the file exits 0.

Not checked: Windows 11, so the compared branch is still only your run. Also ran the executable directly, not through ctest.

On your follow-up note: the layer reporting both features FALSE and accepting both flags is a real gap, and the depth-bias half is not just a report -- OMSetDepthBias is not implemented anywhere in runtime/. A pull request that implements it (record the values, VK_DYNAMIC_STATE_DEPTH_BIAS at replay, then answer OPTIONS16 TRUE) is worth having on its own; I can claim it after this if nobody else does. AI-assisted: yes (OpenCode, DeepSeek V4.1 Flash).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7146200131 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/967#issuecomment-7146200131). Originally posted by [robot00f](https://github.com/robot00f) on 2026-11-24T22:24:55Z. --- Second, independent measurement of the same failure on another Windows 10 machine, and a check of this change on it. Host: Windows 10 Pro 19045, NVIDIA GPU (Pascal class, 4 GB), driver 582.28, in-box `d3d12.dll` 10.0.19041.4355. The branch is based on an older `main`; `git cherry-pick -n d72e8b7f` onto `6b1bc450` (current `main`) applies cleanly. I compiled only `d3d12_pso_validation_test.cpp` with the defines, flags and include paths of the existing `RelWithDebInfo` `build.ninja` entry and linked it against the current `main` libraries into a separate executable. - `main`: fails 3/3, deterministic, `FAIL [gfx: Flags=DYNAMIC_DEPTH_BIAS]: layer 0x00000000 != host NVIDIA GeForce GTX 1050 Ti 0x80070057`. On this host `DYNAMIC_INDEX_BUFFER_STRIP_CUT` does not fail only because EXPECT keeps going -- gating just the depth-bias case would have surfaced it next, as you wrote. - with the change: passes 3/3, `PASS (60 layer checks, 92 host comparisons across 2 host device(s))`, with the `OPTIONS16`/`OPTIONS15` SKIP lines on the GTX 1050 Ti and on WARP. 60 layer checks is the same count as the failing run, so nothing was dropped on the layer side. `CheckFeatureSupport` answers FALSE for both features on the hardware adapter here too, and WARP agrees, so the gate keys on the runtime, not on one vendor. `python -I scripts/check_no_game_data.py` on the file exits 0. Not checked: Windows 11, so the compared branch is still only your run. Also ran the executable directly, not through `ctest`. On your follow-up note: the layer reporting both features FALSE and accepting both flags is a real gap, and the depth-bias half is not just a report -- `OMSetDepthBias` is not implemented anywhere in `runtime/`. A pull request that implements it (record the values, `VK_DYNAMIC_STATE_DEPTH_BIAS` at replay, then answer `OPTIONS16` TRUE) is worth having on its own; I can claim it after this if nobody else does. AI-assisted: yes (OpenCode, DeepSeek V4.1 Flash).
Snooozs commented 2026-11-24 22:29:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Snooozs on 2026-11-24T22:29:46Z.


Thanks for the second measurement. One correction: I have not run this on Windows 11 either (the description says so), so the compared branch on a host that reports the features is not covered by anyone yet. The depth-bias follow-up is yours if you want to claim it; I have not started it.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7146298659 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/967#issuecomment-7146298659). Originally posted by [Snooozs](https://github.com/Snooozs) on 2026-11-24T22:29:46Z. --- Thanks for the second measurement. One correction: I have not run this on Windows 11 either (the description says so), so the compared branch on a host that reports the features is not covered by anyone yet. The depth-bias follow-up is yours if you want to claim it; I have not started it. AI-assisted (Claude Code, Claude Opus 5.5).
qhukz13 commented 2026-11-25 09:33:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-25T09:33:50Z.


Confirmed on a second Windows 10 machine: GeForce GTX 1050 Ti, NVIDIA 582.66, Windows 10 Pro 19045, MSVC RelWithDebInfo, main cdb003ea1 + this PR. d3d12_pso_validation fails on main ([gfx: Flags=DYNAMIC_DEPTH_BIAS]: layer 0x00000000 != host ... 0x80070057, line 436) and passes 3 of 3 with the PR (SKIP host comparison of DYNAMIC_DEPTH_BIAS cases ... OPTIONS16.DynamicDepthBiasSupported is FALSE there, the same for DYNAMIC_INDEX_BUFFER_STRIP_CUT; PASS (60 layer checks, 92 host comparisons across 2 host device(s))). AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7158499152 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/967#issuecomment-7158499152). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-25T09:33:50Z. --- Confirmed on a second Windows 10 machine: GeForce GTX 1050 Ti, NVIDIA 582.66, Windows 10 Pro 19045, MSVC RelWithDebInfo, `main` `cdb003ea1` + this PR. `d3d12_pso_validation` fails on `main` (`[gfx: Flags=DYNAMIC_DEPTH_BIAS]: layer 0x00000000 != host ... 0x80070057`, line 436) and passes 3 of 3 with the PR (`SKIP host comparison of DYNAMIC_DEPTH_BIAS cases ... OPTIONS16.DynamicDepthBiasSupported is FALSE there`, the same for `DYNAMIC_INDEX_BUFFER_STRIP_CUT`; `PASS (60 layer checks, 92 host comparisons across 2 host device(s))`). AI-assisted (Claude Code).
OreoFR commented 2026-11-28 21:45:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:45:44Z.


Verified by OreoFR

  • Base: main c1ecf04ed + PR head 3c4223725; green run in a merge package of 9 PRs, no new ctest failure vs main
  • Test: ctest -R ^d3d12_pso_validation$
  • Red on main: OK on main
  • Green with the PR: OK
  • Verdict: NO RED (test-only PR: DYNAMIC_* flags compared with the host)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246252684 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/967#issuecomment-7246252684). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:45:44Z. --- **Verified by OreoFR** - Base: main `c1ecf04ed` + PR head `3c4223725`; green run in a merge package of 9 PRs, no new ctest failure vs main - Test: `ctest -R ^d3d12_pso_validation$` - Red on main: OK on main - Green with the PR: OK - Verdict: NO RED (test-only PR: DYNAMIC_* flags compared with the host) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
zmasi commented 2026-11-29 02:42:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T02:42:22Z.


Windows 11 + RTX 3090 + WARP Verification (3c4223725a merged with main c8bf0e7b65) — PASS

  • Environment: Windows 11 (10.0.26200, in-box D3D12Core.dll 10.0.26100.9818), MSVC 19.44.35207 (/O2 /MD /EHsc /std:c++20 /W4 /permissive- /utf-8), NVIDIA GeForce RTX 3090 (610.88) + Microsoft WARP + VK_LAYER_KHRONOS_validation 1.4.363.1 (LEONIDA_VK_VALIDATION=1).
  • Merge & Hygiene: Clean git merge-tree onto main (c8bf0e7b65) (0 conflicts); python -I scripts/check_no_game_data.py rc=0; 0 new /W4 warnings.
  • First Native Windows 11 Host Comparison (D3D12Core.dll 10.0.26100.9818):
    • Both RTX 3090 (610.88) and WARP report OPTIONS16.DynamicDepthBiasSupported = TRUE and OPTIONS15.DynamicIndexBufferStripCutSupported = TRUE, so all 4 DYNAMIC_* graphics and compute PSO parity cases compare live against both hosts and pass (rc=0, d3d12_pso_validation_test: PASS (60 layer checks, 100 host comparisons across 2 host device(s)), 0 VUID- validation errors).
  • Red -> Green (simulated Windows 10 pre-OPTIONS15/OPTIONS16 host refusing DYNAMIC_DEPTH_BIAS and DYNAMIC_INDEX_BUFFER_STRIP_CUT with E_INVALIDARG):
    • Red (main): fails with rc=1 (FAIL [gfx: Flags=DYNAMIC_DEPTH_BIAS]: layer 0x00000000 != host NVIDIA GeForce RTX 3090 0x80070057).
    • Green (3c4223725a): runs all 60 layer-side checks (S_OK verified on all 4 DYNAMIC_* cases), logs SKIP host comparison of DYNAMIC_DEPTH_BIAS and SKIP host comparison of DYNAMIC_INDEX_BUFFER_STRIP_CUT across both hosts, and exits rc=0 (PASS (60 layer checks, 92 host comparisons across 2 host device(s))).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7249595481 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/967#issuecomment-7249595481). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T02:42:22Z. --- ### Windows 11 + RTX 3090 + WARP Verification (`3c4223725a` merged with `main` `c8bf0e7b65`) — PASS - **Environment**: Windows 11 (`10.0.26200`, in-box `D3D12Core.dll` `10.0.26100.9818`), MSVC `19.44.35207` (`/O2 /MD /EHsc /std:c++20 /W4 /permissive- /utf-8`), **NVIDIA GeForce RTX 3090** (`610.88`) + Microsoft WARP + `VK_LAYER_KHRONOS_validation` `1.4.363.1` (`LEONIDA_VK_VALIDATION=1`). - **Merge & Hygiene**: Clean `git merge-tree` onto `main` (`c8bf0e7b65`) (`0` conflicts); `python -I scripts/check_no_game_data.py` `rc=0`; `0` new `/W4` warnings. - **First Native Windows 11 Host Comparison (`D3D12Core.dll` `10.0.26100.9818`)**: - Both RTX 3090 (`610.88`) and WARP report `OPTIONS16.DynamicDepthBiasSupported = TRUE` and `OPTIONS15.DynamicIndexBufferStripCutSupported = TRUE`, so all 4 `DYNAMIC_*` graphics and compute PSO parity cases compare live against both hosts and pass (`rc=0`, **`d3d12_pso_validation_test: PASS (60 layer checks, 100 host comparisons across 2 host device(s))`**, `0` `VUID-` validation errors). - **Red -> Green (simulated Windows 10 pre-`OPTIONS15`/`OPTIONS16` host refusing `DYNAMIC_DEPTH_BIAS` and `DYNAMIC_INDEX_BUFFER_STRIP_CUT` with `E_INVALIDARG`)**: - **Red (`main`)**: fails with `rc=1` (`FAIL [gfx: Flags=DYNAMIC_DEPTH_BIAS]: layer 0x00000000 != host NVIDIA GeForce RTX 3090 0x80070057`). - **Green (`3c4223725a`)**: runs all `60` layer-side checks (`S_OK` verified on all 4 `DYNAMIC_*` cases), logs `SKIP host comparison of DYNAMIC_DEPTH_BIAS` and `SKIP host comparison of DYNAMIC_INDEX_BUFFER_STRIP_CUT` across both hosts, and exits `rc=0` (**`PASS (60 layer checks, 92 host comparisons across 2 host device(s))`**). AI-assisted.
aslan2142 commented 2026-12-01 16:32:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:32:33Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317778433 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/967#issuecomment-7317778433). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:32:33Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!967
No description provided.