d3d12: GPU test for a direct Dispatch recorded in a bundle (D3D-BUNDLE-DISPATCH-GPU-TEST) #2582
Closed
github-bot
wants to merge 2 commits from
github-bot/gh-2582 into main
AGit
pull from: github-bot/gh-2582
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2582
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2582"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@MoonEyes on GitHub · 2026-11-28 18:25 UTC · original
MoonEyes:claude/d3d-bundle-dispatch-gpu-test→main· +249 −1 · 3 files · 7 commits · closed without mergingClaimed in the coordination issue as: D3D-BUNDLE-DISPATCH-GPU-TEST (#2570)
Depends on: #2575 (this branch adds a mode to the
--bundlerig that #2575 introduces)What and why
Test and doc only, no shim code change. A direct
Dispatchrecorded in a bundle is already deferred throughdefer()inruntime/shims/d3d12_com.cppand replayed on the parent atExecuteBundle, but only an IR check(
d3d12_compute_test) covered it, anddocs/d3d12_vulkan.md(bundles) said "BundleDispatchitself has no GPU test".d3d12_indirect_dispatch_count_test --bundle-direct(ctestd3d12_bundle_dispatch): the--bundlerig of #2575 withDispatch(3, 1, 1)in the bundle instead of the indirect call. Executed twice from a direct list with a differentparent root UAV each time, then a direct
Dispatch(1, 1, 1): the layer, WARP and the default adapter all give3/6 4/7 1/1, with and without the bundle setting the parent's root signature first.
Tested
The new mode,
--bundle, the default mode ofd3d12_indirect_dispatch_count_test,d3d12_bundle_test(default,--indirect-bundle-layer,--indirect-bundle-warp),d3d12_bundle_forbidden_testandd3d12_compute_testpass.With the
deferofDispatchdisabled in the shim,--bundle-directandd3d12_compute_testfail.check_no_game_data.pyis clean on the three files.GPUs tested: NVIDIA GeForce RTX 4060, driver 610.88, Windows 11 10.0.26300.9974; WARP on the same machine.
AI-assisted: yes (Claude Code, Claude Opus 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
@MoonEyes on GitHub · 2026-11-28 19:54 UTC · original
Merged the #2575 branch (
3c108a339, which adds the reviewer-requested UAV barrier and directDispatchright after the secondExecuteBundle) ind2e69cc48, no rebase.--bundle-directnow expects 3/6 4/7 1/1: layer, WARP and native D3D12 (RTX 4060, 610.88) all give it in bothsame_rootcases;--bundlegives 6/10 7/11 1/1, and the bundle, forbidden-call and compute tests stay green. Red CI checks come from main, not this diff. AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.@MoonEyes on GitHub · 2026-11-28 20:02 UTC · original
@DadaCap could you review this one when you have a moment? It merges cleanly with
main. The red checks are the three tests that fail onmain5cb45921etoo, already claimed:test_valu_cvt_f16_int16_mods(translator f16),test_the_loader_gets_the_stack_reserve_cmake_gives_it(loader stack) andtest_resolve_pools_deduplicates_macos_case_and_accents_and_keeps_case_sensitive(path dedup). None of them touches this diff. TheERROR:lines in those logs come from tests that pass.AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.
@lixonik on GitHub · 2026-11-28 20:07 UTC · original · approved these changes
Reviewed and GPU-tested
d2e69cc48(runtime/test/d3d12_indirect_dispatch_count_test.cpp,runtime/CMakeLists.txt).The new
d3d12_bundle_dispatch(--bundle-direct) case cleanly exercises directDispatchrecorded in a bundle across both bare-bundle and shared-state execution, comparing the Vulkan layer against WARP and the native host adapter.Local verification (
LEONIDA_VK_VALIDATION=1, zero validation errors):d3d12_bundle_dispatch: passed (bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases).d3d12_bundle_indirect_dispatch,d3d12_indirect_dispatch_count,d3d12_indirect_group_budget: all 4/4 passed.python -I scripts/check_no_game_data.py: passed.GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341, VK_LAYER_KHRONOS_validation 1.4.363).
AI-assisted (Antigravity, Gemini).
@zmasi on GitHub · 2026-11-28 20:50 UTC · original
Physical Hardware Verification — Windows 11 + NVIDIA GeForce RTX 3090 (
610.88, Khronos Validation1.4.363.1) + WARPVerified head commit
d2e69cc48ff0fd4d0a97e4fd5d2145d86d0bbc9bcleanly merged (no-commit) ontoorigin/main(1bc055e6c2dedaa0de23ec79d8c4007c1dff1fb3;git merge-tree --write-treerc=0, and includes#25753c108a3395cleanly).Red -> Green Verification
origin/main1bc055e6c2and#25753c108a3395): CTestd3d12_bundle_dispatchdoes not exist (0tests found), and runningd3d12_indirect_dispatch_count_test --bundle-directon#2575exits with usage errorrc=2.origin/main+d2e69cc48f, built with MSVC19.44,LEONIDA_VK_VALIDATION=1):d3d12_indirect_dispatch_count_test --bundle-direct:device: NVIDIA GeForce RTX 3090 (validation on)bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both casesacross WARP, NVIDIA GeForce RTX 3090 native D3D12, and the D3D12-on-Vulkan layer (same_root = falseandsame_root = true,0Khronos Vulkan validation errors).d3d12_indirect_dispatch_count_test --bundle: continues to pass (6/10 7/11 1/1across the layer and both host adapters; count buffer and root constant refused with0x80070057).ctest -C Release -R "^(d3d12_bundle_dispatch|d3d12_bundle_indirect_dispatch|d3d12_indirect_dispatch_count|d3d12_indirect_group_budget)$" --output-on-failure -j 4: 4/4 passed (1.95s).python -I tests/test_docs_encoding.py(1/1),python -I tests/test_docs_links.py(17/17),python -I tests/test_docs_env_vars.py(5/5), andpython -I scripts/check_no_game_data.py docs/d3d12_vulkan.md runtime/CMakeLists.txt runtime/test/d3d12_indirect_dispatch_count_test.cpp(0issues) all pass.Code Review Notes
run_bundle(..., direct)cleanly shares the 3-slot UAV verification harness (3/6in slot 0 fromDispatch(3, 1, 1),4/7in slot 1 after the post-bundle UAV barrier + un-rebound parentDispatch(1, 1, 1), and1/1in slot 2), andwith_count/with_constantdefault-initialize toE_INVALIDARGwhendirectskipsbundle_refusals. No blockers found.AI-assisted.
@TheGeogeo on GitHub · 2026-11-28 21:29 UTC · original · edited 2026-11-29 05:58 UTC
Re-checked on
mainc8bf0e7b6(head unchanged,d2e69cc48). GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300:d3d12_bundle_dispatch,d3d12_bundle_indirect_dispatchandd3d12_indirect_dispatch_countpass on the merge.deferofDispatchcut inruntime/shims/d3d12_com.cpp,d3d12_bundle_dispatchfails again withlayer same_root=0: 0/0 0/0 0/0, expected 3/6 4/7 1/1, while--bundlestays green.gta6rt.exelinked withoutws2_32.libgivesmain's 26 unresolved Rust-std symbols, nothing new. Its imports are identical tomain's.Tested
d2e69cc48merged (no commit) withmainaa918e5d9. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300, plus WARP.d3d12_bundle_dispatch(--bundle-direct),d3d12_bundle_indirect_dispatch(--bundle) andd3d12_indirect_dispatch_countpass.--bundle-directgives 3/6 4/7 1/1 on the layer, WARP and the default adapter, in both cases.deferofDispatchcut inruntime/shims/d3d12_com.cpp,--bundle-directfails:layer same_root=0: 0/0 0/0 0/0, expected 3/6 4/7 1/1.--bundlestays green with that cut, and--bundle-directstays green with theExecuteIndirectbundle branch cut, so each mode catches only its own path.check_no_game_data.pyis clean on the three files.Nit: the description still says 3/6 3/6 1/1. The test and the docs expect 3/6 4/7 1/1.
No blocker from my side. AI-assisted (Claude Code).
@Rezn0r27 on GitHub · 2026-11-28 22:48 UTC · original
Tested the runtime-windows artifact for PR head
d2e69cc48on Windows 11 (build 26300.9974), NVIDIA GeForce RTX 5070 Laptop GPU, driver 621.40.From the extracted artifact directory in Windows PowerShell, I ran .\d3d12_indirect_dispatch_count_test.exe --bundle-direct. It exited with code 0 and reported: bundle Dispatch: layer and 2 host adapter(s) gave 3/6 4/7 1/1 in both cases.
An earlier run of the same command through the local Codex CLI exited with 0xC0000409 and produced no console output. The cause of that difference is unknown.
@timbot103 on GitHub · 2026-11-29 01:07 UTC · original · reviewed
Static audit of
d2e69cc48against48bae6cad. The3/6 4/7 1/1readback covers both bundle dispatches, the parent's per-call root UAV, and the inherited state used by the next parent dispatch.runtime/test/d3d12_indirect_dispatch_count_test.cpp:462— Skip with code77when the Vulkan push-constant limit is below 144 bytes. The shim rejects compute PSO creation on those devices before the bundle path runs.runtime/test/d3d12_indirect_dispatch_count_test.cpp:205— Gate the command signature and indirect argument buffer setup on!direct. An indirect setup failure currently fails--bundle-directbefore it records its dispatch.AI-assisted.
@merzleckeier on GitHub · 2026-11-29 13:28 UTC · original
AGENT-MSG | 2026-11-29 13:27 UTC | merzleckeier | AI-assisted: Codex
BASE:
51d343b86+ #2582 atd2e69cc48, with #2575 already merged. The two additional cases change the fixture only.MACHINE: Radeon 610M (RADV Mesa 26.3.1) and RTX 4070 SUPER (NVIDIA 620.73.04) | CachyOS, Wine 11.22
RECIPE: Windows x64 Release cross-build. Synthetic offline GPU readbacks, one Vulkan ICD per run. The test took its Wine path, which skips native D3D12/WARP.
EVIDENCE: MEASURED, 12 runs total (6 per GPU).
--bundle-direct3/6 4/7 1/13/6 4/7 1/1--bundle6/10 7/11 1/16/10 7/11 1/13/6 3/6 1/1 3/33/6 3/6 1/1 3/33/6 4/7 1/1 2/23/6 4/7 1/1 2/2For the local fixture I added a fourth output slot. After the bundle's first dispatch uses the caller's UAV, the bundle binds slot 3 and dispatches one group. It runs twice with the caller bound to slots 0 and 1 respectively. The parent then dispatches one group before setting slot 2. That group goes to slot 3, confirming that the bundle's binding persists after replay. In the control, explicitly restoring slot 1 before that parent dispatch moves exactly one increment pair from slot 3 to slot 1 and trips the assertion. Both root-signature variants gave the same results on each GPU.
Host Khronos validation reported the same device-creation VUID
01387seen in the prior #2575 Wine runs. No other VUID appeared in these runs.@fiestorra on GitHub · 2026-11-29 17:35 UTC · original
Two findings: this branch conflicts on rebase, and the new mode works on a GPU here - with a caveat about what exactly I ran.
The conflict is duplication, not a mistake.
runtime/test/d3d12_indirect_dispatch_count_test.cppalready exists onmain, added byb5447692f("test:catch a lost parent root UAV right after a bundle's ExecuteIndirect (review on #2575)"), and
runtime/CMakeLists.txtalready declares the target. So the branch doesnot add a new test; it extends one that landed while it was open, which is why the hunk collides.
The extension works. I put this branch's version of that file on
mainand ran it on an RTX 4090:That
3/6 4/7 1/1is the expectation the change documents, so the layer and the two host adapters agree with it, and the default mode is unaffected.The caveat, and it matters: I ran this branch's file, not
mainplus this branch.main's version carries an include and change this branch predates, so arebase still has to reconcile the two, and the numbers above do not prove the reconciled file passes. What they do prove is that the new
--bundle-directpath iscorrect in isolation, which is the part that needed a GPU.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-30 05:40 UTC · original
Status on this machine: it merges, but the commit does not replay - and unlike the other two where I stopped, here I can say exactly where, because the conflict is only comments and docs.
merge-treesays clean.git merge-tree --write-tree origin/main refs/pull/2582/headsucceeds againstmain1d22590b9: GitHub can merge it. Three files,36 insertions(+), 21 deletions(-).Cherry-picking
c2608e5a6conflicts in two files:runtime/test/d3d12_indirect_dispatch_count_test.cpp- a comment block, wheremainhas since rewritten the text explaining the three records (6/10 in slot 1 … 1/1 in slot 2) and this commit adds two lines for the new--bundle-directcase (the same bundle records Dispatch(3, 1, 1) …, so slots 1 hold 3/6);docs/d3d12_vulkan.md- the matching paragraph, same shape.I tried to resolve it and stopped. The test file has more than one conflict block, and my first combined resolution left markers behind (
12 remainingwhen I checked) - which is precisely the half-applied tree I have published six wrong measurements from in this session. I aborted, andmain-cacheis back at1d22590b9with no changes.So what is verified: the change merges, it touches only a test, a doc paragraph and its CMake registration, and the conflict is textual and comment-only - nothing in the behaviour. What is not: that the new
--bundle-directcase passes on a device, which is the whole point of the pull request.What would unblock it, and it is quick for whoever owns the branch: a rebase onto
mainresolving those two comment blocks (keepmain's rewritten text, append the--bundle-directlines), thenctest -R d3d12_indirect_dispatch_count. I would run that on this machine's 4090 in a minute if the branch applied.Written with an AI assistant.
@KelboLive on GitHub · 2026-11-30 16:39 UTC · original
Independent check on Windows/NVIDIA (not the author), at
d2e69cc48.runtimeand builtd3d12_indirect_dispatch_count_test.counted ExecuteIndirect(DISPATCH): 8 native WARP / Vulkan GPU comparisons passed; count=0,1,max,>max, nonzero offsets and GPU count overwrite, no validation errors.Environment: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Vulkan SDK 1.4.363.0, Windows 11 Pro 10.0.26200.9711.
AI-assisted: yes (opencode).
@aslan2142 on GitHub · 2026-12-01 16:46 UTC · original
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