test: bind a PSO before direct heap dispatch #2153
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2153"
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?
Imported from ubiquitarianism/leonida. Originally posted by Joaco9020 on 2026-11-26T00:11:49Z.
Claimed in the coordination issue as
RT-DIRECT-HEAP-DISPATCH-TEST.What and why
The direct heap indexing regression check dispatched without binding a compute PSO. The command list correctly rejected the dispatch, so the test had no recorded command to inspect. This adds the existing synthetic compute shader to the test target, builds a small shader library for it, and binds its PSO before asserting the remapped CBV and sampler heap bases in dispatch user data.
Tested
d3d12_set_descriptor_heaps_testwith MSVC on currentmain(c50ed94).ctest --test-dir runtime/build -C RelWithDebInfo -R '^d3d12_set_descriptor_heaps$' --output-on-failure— passed.record_dispatchrejected the missing PSO.python -I scripts/check_no_game_data.py runtime/CMakeLists.txt runtime/test/d3d12_set_descriptor_heaps_test.cpp— passed.GPUs tested: NVIDIA GeForce RTX 3070, driver 621.01, Windows 11 IoT Enterprise build 22631.
AI-assisted: yes.
Checklist
mainand merges cleanly.Imported from ubiquitarianism/leonida. Originally posted by moffington on 2026-11-26T00:51:44Z.
Verified
13e0d78evs merge-base88479ff6on Linux / Wine (clang-cl 23.1.3+xwinSDK 10.0.26100,glslangValidator, NVIDIA GeForce RTX 3060, driver 615.78.08) withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.88479ff6):d3d12_set_descriptor_heaps_test.exefails (exit 1) atd3d12_set_descriptor_heaps_test.cpp:353(CHECK failed: rt::d3d12::recorded_commands(list.p, cmds) && !cmds.empty()) afterrecord_dispatchrejects the un-bound-PSO dispatch (d3d12_com.cpp:1986).13e0d78e):d3d12_set_descriptor_heaps_test.exepasses (exit 0; 23 single-list cases, 7 bundle parity cases, ClearState/Reset, lifetime pinning, direct-index flags) with the synthetic compute PSO bound and both direct-indexed heap bases recorded.VUID-vkCreateDevice-ppEnabledExtensionNames-01387:VK_EXT_external_memory_dma_bufwithoutVK_KHR_external_memory_fd); zero PR-introduced validation errors. WhenglslangValidatoris absent at configure time (LEONIDA_TEST_CS_SPVundefined), the direct-heap dispatch assertions incheck_tracking_lifetime_and_direct_indexing()are compiled out.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by ammonium231 on 2026-11-26T08:54:29Z.
RTX 3090 / 621.40, validation on: d3d12_set_descriptor_heaps fails on current main
a73a57e13(record_dispatch rejects a missing PSO, recorded_commands empty). With this PR merged onto that main: pass, 23 single-list + 7 bundle cases, 0 VUID.Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-26T19:44:56Z.
Native Windows 10 Pro 19045, GTX 1050 Ti (Pascal), NVIDIA 582.66, MSVC RelWithDebInfo,
13e0d78ebmerged onto main2d43417d4(clean).d3d12_set_descriptor_heapsfails atline 353: rt::d3d12::recorded_commands(list.p, cmds) && !cmds.empty(). The log showsrecord_dispatch rejected a call (d3d12_com.cpp:1986): the PSO-less dispatch #2141 added hits the existing no-PSO rejection. It is one of 16 failures in a fullctestof main on this card, and the only one that isn't host-specific.LEONIDA_VK_VALIDATION=1.The fix binds a real compute PSO built on the directly-indexed root signature, so the
user_dataassertions now see what replay receives. That is the right fix rather than relaxing the no-PSO rule.One small thing: without
glslangValidatorthe whole direct-heap block is compiled out, so the test passes without checking it. Astd::printf("... skipped: no glslangValidator\n")in the#elsebranch would make that visible in the log, as other tests do.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by adrianmjim on 2026-11-27T21:25:00Z.
AMD data point: this diff applied to
maincf1c34128(it applies cleanly). AMD Radeon RX 7900 XT (RDNA3), AMD 32.0.32029.2010, no Resizable BAR, Windows 11 26300, VS 2022 (MSVC 19.44) RelWithDebInfo.main:d3d12_set_descriptor_heapsfails every run atline 353: CHECK failed: rt::d3d12::recorded_commands(list.p, cmds) && !cmds.empty(), and also inside a fullctest -j 6.LEONIDA_VK_VALIDATION=1, withVK_LAYER_KHRONOS_validationloaded and no VUIDs.On this card without Resizable BAR the test prints
vkAllocateMemory failed (-2): 268435456 bytes, memory type 2 (flags 0x7, heap 2 of 256 MiB), onmainand with this PR. It is the device-local host-visible type. The test still passes with it, so it is not what fails at line 353.Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:05:56Z.
Merged into
main(merge commitffbfef54b), approved by DadaCap (maintainer). Thanks!Checked before merging:
d3d12_set_descriptor_heapsfails on main (a Dispatch without a PSO recorded nothing) and passes with this PR. The merge was pinned to the head commit that was tested (13e0d78eb).AI-assisted (Claude Code), posted for DadaCap.