Skip to content

d3d12_execute_indirect_validation_test: an older D3D12 runtime (Windows 10, Windows 11 22631) refuses five exact-fit / max=0 cases; hold only the layer to the newer verdicts there - #7393

Open
etcetera-yt wants to merge 2 commits into
ItsNotRexed:mainfrom
etcetera-yt:execute-indirect-validation-win10-rule

Conversation

@etcetera-yt

@etcetera-yt etcetera-yt commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: new TEST item, #7333 (comment)

What and why

d3d12_execute_indirect_validation (from #6830) fails on Windows 10: 5 of 49 parity cases. The layer is right. The table's verdicts were measured on Windows 11 WARP and an RTX 5090. Windows 10's in-box d3d12.dll (WARP and the NVIDIA driver give the same verdicts) uses an older bounds rule: offset + stride * max_count <= width, checked even when max_count is 0. So it refuses:

case Windows 11 Windows 10 host
arg_offset=260 >width (max=0 no-op) S_OK E_INVALIDARG
arg_offset=U64MAX-3 aligned (max=0 no-op) S_OK E_INVALIDARG
draw stride=20 off=240 max=1 (240+16==256) S_OK E_INVALIDARG
draw stride=20 off=220 max=2 (220+20+16==256) S_OK E_INVALIDARG
dispatch stride=20 off=244 max=1 (244+12==256) S_OK E_INVALIDARG

That one rule also gives the other 44 verdicts on Windows 10. For example, arg_offset=256 ==width (max=0) passes there, while 260 fails.

The change is in the test only:

Nothing is left of the item.

Tested

RTX 5060 Ti, NVIDIA 621.14, Windows 10 19045 (in-box D3D12, no Agility SDK), MSVC 14.44 (VS 2022 BuildTools), RelWithDebInfo, main 8575d36ed.

  • main: d3d12_execute_indirect_validation fails, 5 failures (the five rows above, layer=1 warp=0 hw=0 expected=1).
  • This branch: passes, 49 parity cases (WARP=live, HW=NVIDIA GeForce RTX 5060 Ti), positive GPU dispatch ok, 0 validation errors, 0 failures, plus Windows 10's bounds rule on the host (WARP, NVIDIA GeForce RTX 5060 Ti, no ID3D12Device10): it refuses 5 cases .... It also passes with LEONIDA_VK_VALIDATION=1.
  • Negative controls (each restored after):
    • Layer changed to Windows 10's rule (required = max_command_count * stride in d3d12_com.cpp): the test fails. The positive GPU dispatch fails first (line 325: SUCCEEDED(list->Close())). With that dispatch also commented out, the table itself fails 3 cases with layer=0 ... expected=1. So the layer is still held to Windows 11.
    • Flag removed from draw stride=20 off=240: that case fails on Windows 10 (layer=1 warp=0 hw=0 expected=1), and the summary says 4 cases.
  • Full ctest on this branch, with and without validation, vs the main baseline: in a comment below once it finishes.

Not tested: Windows 11 (no machine here). There ID3D12Device10 exists, so older_runtime_rule() is false and the comparison is the same as on main. A Windows 11 run would confirm it. Also not tested: a Windows 10 host with the Agility SDK.

AI-assisted: yes (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

https://claude.ai/code/session_01GZEZyXGTTXs4V33hrBw1tD

… an older bounds rule

The table's verdicts were measured on Windows 11. Windows 10's d3d12.dll (WARP and the hardware driver alike)
needs offset + stride * max_count <= width, also for max_count 0, so it refuses five cases Windows 11 accepts:
an argument buffer the last command fits exactly but a whole stride doesn't, and an out-of-range offset with
max_count 0. The test failed 5 of 49 cases there.

Those five cases are flagged. A live host that refuses all of them and has no ID3D12Device10 (Windows 10's
runtime) is compared with the older verdicts on them; every other case, and the layer always, keeps the
Windows 11 table. The layer is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZEZyXGTTXs4V33hrBw1tD
@MartinIndra02

Copy link
Copy Markdown

Independent Windows 11 + GPU test of dea60e771: pass.

Setup: Windows 11 x64, MSVC 19.44.35220 (RelWithDebInfo, Windows SDK 10.0.26100.0), NVIDIA GeForce RTX 3080 (driver 32.0.16.2124 / 621.24), Vulkan SDK 1.4.363.1, no game files.

  • d3d12_execute_indirect_validation_test.exe: PASS (exit 0) — confirms no regression on Windows 11 where the full host-vs-layer comparison remains active.

AI-assisted review/test.

@etcetera-yt

Copy link
Copy Markdown
Contributor Author

Thanks @MartinIndra02 for the Windows 11 run (RTX 3080 / 621.24). That's the half I couldn't test: with ID3D12Device10 present, the full comparison stays as on main. AI-assisted (Claude Code).

@etcetera-yt

Copy link
Copy Markdown
Contributor Author

Full rebuild and full ctest on this branch (dea60e771, on main 8575d36ed), RTX 5060 Ti, 621.14, Windows 10 19045, RelWithDebInfo, ctest -j2:

AI-assisted (Claude Code).

@justrealyme

Copy link
Copy Markdown

Tested dea60e7 on NVIDIA GeForce RTX 5070 Ti, driver 617.42, Windows 11 build 26300, VS 2022 Build Tools (MSVC 19.44), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, RelWithDebInfo: pass.

Built d3d12_execute_indirect_validation_test and ran ctest -R ^d3d12_execute_indirect_validation: Passed (0.7 s). This host is Windows 11, so it exercises the non-Windows-10 path.

Synthetic tests only, no game files. AI-assisted (Claude Code).

@likecrank-dotcom

Copy link
Copy Markdown

Independent Windows 11 check requested in the PR description: PASS at exact head dea60e77127829b6b6e40c93341fc240f2bb0c83.

Windows 11 Pro 10.0.26300 (build 26300), NVIDIA GeForce RTX 5060 Ti, driver 621.14 / 32.0.16.2114. MSVC 19.44.35230.0, Windows SDK 10.0.26100.0, CMake 3.31.6-msvc6, VS 2022 x64 RelWithDebInfo. Built d3d12_execute_indirect_validation_test with no local source changes.

Focused CTest d3d12_execute_indirect_validation: PASS, 1.31 s. The test reports 49 parity cases with live WARP and live NVIDIA hardware D3D12, positive GPU dispatch OK, and 0 failures. The Windows 10 bounds-rule message did not appear: this run retained the Windows 11 verdicts for the five flagged cases, on both live host devices.

LEONIDA_VK_VALIDATION=0 for this run: the Khronos validation layer is not installed on this host, so this is not a validation-layer result despite the test's zero-error counter. Only this focused test was run; no game files or retail execution were used.

AI-assisted with Codex.

@Hubitski

Copy link
Copy Markdown

Independent Windows 11 check at dea60e771 merged into 042c5f378 (merge b26c950) on Windows 11 Pro 10.0.22631, AMD Radeon RX 7800 XT (AMD proprietary 26.11.2 / driver 32.0.32029.2010), MSVC 19.44.35207, Windows SDK 10.0.26100, Vulkan-Headers fetched, RelWithDebInfo: 5 failures.

ID3D12Device10 is present on this host, so older_runtime_rule() returns false and the host is compared with the Windows 11 table. But live WARP and the AMD driver both refuse all five older_runtime_refuses cases, while the layer returns S_OK:

FAIL arg_offset=260 >width (max=0 no-op): layer=1 warp=0 hw=0 expected=1
FAIL arg_offset=U64MAX-3 aligned (max=0 no-op): layer=1 warp=0 hw=0 expected=1
FAIL draw stride=20 off=240 max=1 (240+16==256): layer=1 warp=0 hw=0 expected=1
FAIL draw stride=20 off=220 max=2 (220+20+16==256): layer=1 warp=0 hw=0 expected=1
FAIL dispatch stride=20 off=244 max=1 (244+12==256): layer=1 warp=0 hw=0 expected=1
execute_indirect_validation: 49 parity cases (WARP=live, HW=AMD Radeon RX 7800 XT), positive GPU dispatch ok, 0 validation errors, 5 failures

So the older rule is not limited to runtimes without ID3D12Device10: Windows 11 22631 here follows it. Detecting it by the observed verdicts (drop the Device10 early return, or key on the Windows build) would make this host pass; as written, the PR stays red on it. Current main without the PR shows the same five failures. No game files. AI-assisted (Claude Code).

@Snooozs

Snooozs commented Nov 23, 2026 •

Copy link
Copy Markdown

Independent check on Windows 10: d3d12_execute_indirect_validation fails on plain main 1befe1d and passes with this PR (head dea60e7) merged onto main 867d922 (merge was clean; only the test file changes).

Windows 10 Pro 22H2 (10.0.19045), NVIDIA GeForce RTX 5060 Ti (driver 621.01, Vulkan 1.4.357) with the in-box D3D12 and WARP as hosts, Vulkan SDK 1.4.363.0, VS 2022 RelWithDebInfo; ctest -R "^d3d12_execute_indirect_validation$": 1/1 passed.

AI-assisted (Claude Code); the build and the run are from that machine.

@caiodstx

Copy link
Copy Markdown

Tested dea60e771 merged alone on main dde82f27e on AMD Radeon RX 6700 XT (RDNA2, gfx1031), AMD 26.9.1 (Vulkan 1.4.315), Windows 11 IoT Enterprise LTSC 2024 (26100), MSVC 14.51 + Ninja, RelWithDebInfo, Vulkan headers via -DLEONIDA_VULKAN_HEADERS_FETCH=ON, no game files: pass, no regressions.

  • The PR's tests pass: d3d12_execute_indirect_validation
  • Full ctest: no test fails with this PR that doesn't also fail on main alone.

On main alone, on this GPU, the full ctest fails these: d3d12_vulkan_device, d3d12_texture_tiles and d3d12_pipeline_library_host (each has an open fix PR), d3d12_depth_resolve (from #6610, fixed by #7905), and vk_queue_query_sync, which is flaky on main here (line 468: progress_loss_ok, 5 of 10 serial runs fail; also seen in #8426).

Ran the full ctest --test-dir runtime/build -j 6 with the PR merged alone and compared the failures with main alone. AI-assisted (Claude Code).

…by the host's verdicts, not by ID3D12Device10

Windows 11 22631 (an RX 7800 XT host, reported on ItsNotRexed#7393) has ID3D12Device10 but its WARP and driver refuse the same five
cases as Windows 10 19045. So the older rule belongs to the D3D12 runtime, not to the interface set. A host that
refuses all five follows it; one that refuses only some still fails. The layer is held to the newer verdicts as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZEZyXGTTXs4V33hrBw1tD
@etcetera-yt

Copy link
Copy Markdown
Contributor Author

Thanks @Hubitski, that's the case I couldn't test, and you're right: the older rule belongs to the D3D12 runtime, not to the interface set. Fixed in ab4909e5e:

  • older_runtime_rule() no longer checks ID3D12Device10. A live host that refuses all five flagged cases follows the older rule and is compared with those verdicts. A host that refuses only some of them still fails, and the layer is still held to the newer table.
  • The comments and the summary line now say "older D3D12 runtime (Windows 10 19045, Windows 11 22631)" instead of "Windows 10".

Re-tested here (RTX 5060 Ti, 621.14, Windows 10 19045): the test passes with and without LEONIDA_VK_VALIDATION=1 (older D3D12 bounds rule on the host (WARP, NVIDIA GeForce RTX 5060 Ti): it refuses 5 cases, 0 failures). Both negative controls still fail:

  • layer switched to the whole-stride rule, with the positive dispatch skipped: 3 failures, layer=0 ... expected=1;
  • one case unflagged: that case fails, layer=1 warp=0 hw=0.

A re-run on your 22631 host would confirm the fix there. On a 26xxx host (@MartinIndra02, @likecrank-dotcom) nothing changes: WARP accepts the five, so the comparison is the same as on main. Thanks also @likecrank-dotcom, @Snooozs and @caiodstx for the runs. AI-assisted (Claude Code).

@etcetera-yt etcetera-yt changed the title d3d12_execute_indirect_validation_test: Windows 10's in-box D3D12 refuses five exact-fit / max=0 cases; hold only the layer to Windows 11 there d3d12_execute_indirect_validation_test: an older D3D12 runtime (Windows 10, Windows 11 22631) refuses five exact-fit / max=0 cases; hold only the layer to the newer verdicts there Nov 23, 2026
@Hubitski

Copy link
Copy Markdown

Re-run at merge 40bfd8c (ab4909e5e into main 867d922f) on Windows 11 Pro 10.0.22631 / AMD Radeon RX 7800 XT: pass, 0 failures. The summary now reads "older D3D12 bounds rule on the host (WARP, AMD Radeon RX 7800 XT): it refuses 5 cases the newer runtime accepts"; ctest -R ^d3d12_execute_indirect_validation$ passed. The verdict-based detection catches this host. No game files. AI-assisted (Claude Code).

@etcetera-yt

Copy link
Copy Markdown
Contributor Author

Thanks @Hubitski for re-running on your 22631 / RX 7800 XT host: the verdict-based detection catches it now, with 0 failures. AI-assisted (Claude Code).

@melesnaker-glitch

Copy link
Copy Markdown

Tested ab4909e5e, squashed onto main 867d922f0 (clean), on Windows 11 22631 with NVIDIA. The re-run at this head on 22631 so far was AMD. Setup: GeForce RTX 3060, driver 610.88, MSVC 14.44 RelWithDebInfo, Vulkan SDK 1.4.363.0. Result: pass.

  • On main, d3d12_execute_indirect_validation fails here: 49 parity cases …, 0 validation errors, 5 failures. The 5 failures are the exact-fit draw and dispatch cases, with layer=1 warp=0 hw=0.
  • With this PR, ctest -R ^d3d12_execute_indirect_validation$ passes with and without LEONIDA_VK_VALIDATION=1.
  • The test prints older D3D12 bounds rule on the host (WARP, NVIDIA GeForce RTX 3060): it refuses 5 cases the newer runtime accepts …; the layer is held to the newer verdicts, then 49 parity cases (WARP=live, HW=NVIDIA GeForce RTX 3060), positive GPU dispatch ok, 0 validation errors, 0 failures.

So the verdict-based detection from ab4909e5e also catches the older rule on an NVIDIA 22631 host.

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

@niilun

niilun commented Nov 23, 2026

Copy link
Copy Markdown

Tested ab4909e5e on NVIDIA GeForce RTX 3060 Ti (Ampere), driver 610.88 (32.0.16.1088), Windows 10 Enterprise 19045, MSVC 19.52.37029 (VS 2026): pass

This is the first Windows 10 check of commit ab4909e5e, as the earlier Windows 10 checks were for commit dea60e771.

Ran the following commands:

cmake --build runtime/build --config RelWithDebInfo --target d3d12_execute_indirect_validation_test
ctest --test-dir runtime/build -C RelWithDebInfo -R "^d3d12_execute_indirect_validation$" -V
  • main: fails, message: 49 parity cases (WARP=live, HW=NVIDIA GeForce RTX 3060 Ti), positive GPU dispatch ok, 0 validation errors, 5 failures.
  • This PR: passes, 49 parity cases ..., 0 validation errors, 0 failures, and prints older D3D12 bounds rule on the host (WARP, NVIDIA GeForce RTX 3060 Ti): it refuses 5 cases the newer runtime accepts.
  • With arg LEONIDA_VK_VALIDATION=1: it passes with 0 validation errors.

So, the detection based on verdicts alone in this PR works on a Windows 10 machine, even on an older driver than the 5060Ti one.

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.

9 participants