Repository navigation
d3d12_indirect_dispatch_count_test: its compute fixture reads the root UAV at s4:s5 (D3D-448 layout) - #5792
d3d12_indirect_dispatch_count_test: its compute fixture reads the root UAV at s4:s5 (D3D-448 layout)#5792mrp1no wants to merge 1 commit into
Conversation
…e compute layout D3D-448 (7c22526) moved compute root arguments to rt::rootsig::pack_stage's layout, from s4, and moved the compute GLSL fixtures with it. This fixture came with c262fb7 at the same time and still read its root UAV at s0:s1, so on main every Vulkan dispatch of d3d12_indirect_dispatch_count_test wrote through the wrong address. The layer read back 0/0 in all eight cases and the test exited 1 on an Intel UHD 750 and an RTX 3060. It now reads s4:s5, like cs_sg_probe.comp. The runtime is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested 988048d on Windows 11 with an NVIDIA GeForce RTX 4090 (32.0.16.2101) and AMD Radeon(TM) Graphics (32.0.21043.5001): pass. I ran the four tests below on each adapter with Vulkan validation off and on. The runtime identified the selected adapter in every run. All 16 test runs passed. The changed fixture matched native WARP in all eight dispatch cases on each run. foreach ($adapter in 'NVIDIA','AMD') {
$env:LEONIDA_VK_DEVICE = $adapter
foreach ($validation in '0','1') {
$env:LEONIDA_VK_VALIDATION = $validation
ctest --test-dir E:/Leonida-review-work-build -C RelWithDebInfo -V -R '^d3d12_(indirect_dispatch_count|indirect_zero|m4_compute|compute)$'
}
}On parent 561b65a, the indirect dispatch count test failed in all four configurations. For AI-assisted. Synthetic GPU tests only. |
|
Tested 988048d on Intel UHD Graphics 770, driver 32.0.101.7088: d3d12_indirect_dispatch_count_test builds at this head and exits 0 with "counted ExecuteIndirect(DISPATCH): 8 native WARP / Vulkan GPU comparisons passed; count=0,1,max,>max, nonzero offsets and GPU count overwrite, no validation errors", with device line "Intel(R) UHD Graphics 770 (validation on)" under LEONIDA_VK_VALIDATION=1 and the same 8 comparisons without it. With VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation set, the loader prints "Insert instance layer" for the validation layer and the run passes with no validation errors. LEONIDA_VK_VALIDATION=1 alone did not load the layer here. I did not run main. AI-assisted. |
Kam471
left a comment
There was a problem hiding this comment.
Head: 988048d.
- Built
d3d12_indirect_dispatch_count_test(Ninja, RelWithDebInfo) and ran withLEONIDA_VK_DEVICE='RTX 5070 Ti': exit 0,8 native WARP / Vulkan GPU comparisons passed, no validation errors. - Reverting only the fixture to
pc.s[0], pc.s[1]and rebuilding reproducescount 0 update 1: host 6/10, layer 0/0, expected 6/10, exit 1. rt::rootsig::pack_stage(Stage::Compute)starts at s4 and a root UAV is two dwords, so s4:s5 is the runtime layout; the assertions are unchanged.
Verdict: approve; fixture fix, not a test masking a shim bug.
|
Tested commit
AI-assisted (Gemini 4 Neon). |
|
Tested A Not run: the rest of ctest on this head (only the GLSL fixture changes), other GPUs. No game files. AI-assisted (Claude Code). |
|
Independent Windows RTX 5080 check of Using Khronos validation 1.4.357 with synchronization checks active, the original shader reproduced |
|
Verified on Windows 11, MSVC 19.44, Vulkan SDK 1.4.363.0 on AMD Radeon RX 9070 XT (driver 26.10.1):
|
|
Tested the corrected fixture at These are layer-versus-CPU measurements. I used a local copy of the fixture that calls the existing |
|
Tested
AI-assisted (Claude Code). |
|
Independent confirmation on an RTX 2080 Ti (Turing, driver 610.88, Windows 11 26200, MSVC from VS 18). On The cause and bisect are written up in #6162: first-parent bisect limited to |
|
Tested
AI-assisted (Claude Code). |
…otRexed#6162 On c6384df, six direct compute controls write at offset zero with the old fixture and at the chosen byte offset with s4:s5. Actual Windows indirect dispatch remains a separate acceptance check. AI-assisted integration.
|
Tested |
|
Tested
AI-assisted (Claude Code). |
|
Reviewed and tested Review: the change is right. Tests (merged with
About the red |
|
Tested 988048d on NVIDIA GeForce RTX 5080 Laptop GPU, driver 621.14 (Blackwell), Windows 11 (build 26300), MSVC 14.44, RelWithDebInfo: pass, and it fixes a failure on
A third GPU family after the UHD 750 and RTX 3060. AI-assisted. |
Claimed in the coordination issue as a new D3D item: #5581 (comment)
What and why
On
main561b65a8,d3d12_indirect_dispatch_count_testexits 1. The first case it prints iscount 0 update 1: host 6/10, layer 0/0, expected 6/10. Once the test is changed to go on past a failure, the layer gives 0/0 in all eight cases. This happens on an Intel UHD 750 and on an RTX 3060, with and without validation, and the D3D12 calls all succeed.Two merges landed close together and conflict on meaning:
7c225260) moved compute root arguments to the console layout (rt::rootsig::pack_stage, from s4) and updated the compute GLSL fixtures to read the new places.cs_indirect_dispatch_count.compcame withc262fb7bat the same time. It still reads its root UAV ats[0]:s[1], so every layer dispatch wrote through an address that isn't the UAV.The fixture now reads
s[4]:s[5], likecs_sg_probe.comp. One file changes, and the runtime is unchanged.Tested
Windows 11, MSVC RelWithDebInfo, on the branch head:
d3d12_indirect_dispatch_count_testexits 0 with "8 native WARP / Vulkan GPU comparisons passed" on:LEONIDA_VK_VALIDATION=1;LEONIDA_VK_VALIDATION=1.d3d12_m4_compute_test,d3d12_compute_testandd3d12_indirect_zero_teststill pass on the UHD 750.561b65a8without this change, the test exits 1 on both GPUs (layer 0/0).No game files involved. AI-assisted (Claude Code).
🤖 Generated with Claude Code