d3d12: GPU test for a direct Dispatch recorded in a bundle (D3D-BUNDLE-DISPATCH-GPU-TEST) #2582
Closed
leonida/mandy
MoonEyes wants to merge 0 commits from
claude/d3d-bundle-dispatch-gpu-test into main
pull from: claude/d3d-bundle-dispatch-gpu-test
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
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
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2582
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/d3d-bundle-dispatch-gpu-test"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Claimed in the coordination issue as: D3D-BUNDLE-DISPATCH-GPU-TEST (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7243769189)
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
Merged the #2575 branch (3c108a339, which adds the reviewer-requested UAV barrier and direct
Dispatchright after the secondExecuteBundle) in d2e69cc48, 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.@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 onmain5cb45921e too, 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.
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).
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.
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).
Tested the runtime-windows artifact for PR head d2e69cc48 on 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.
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.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.
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.
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).
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.