Repository navigation
D3D-482: Draw, Dispatch and ExecuteIndirect(DISPATCH) recorded with no PSO are no-ops, as on the host D3D12 runtime - #7007
lines9686-rgb wants to merge 2 commits into
Conversation
…; close parity and the null-PSO test The host runtime runs Draw, Dispatch and ExecuteIndirect(DISPATCH) recorded with no PSO through its no-op pipeline state (RTX 3060 Ti, NVIDIA 610.88: Close S_OK, executed, device alive; the debug layer's message is "The runtime will use a default no-op pipeline state"). WARP closes the same lists but removes the device when a nonzero null-PSO draw executes, so only Close is compared with WARP. ExecuteIndirect(DISPATCH) gets the same no-op as Dispatch; d3d12_close_parity's four "with nothing set" rows now match WARP; d3d12_null_pso_noop_test adds the ExecuteIndirect cases and a layer-only run of real null-PSO work followed by a copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SirKingg
left a comment
There was a problem hiding this comment.
Independent Windows/GPU review of d0656b7f64578dd3dde858355b080f7325ba6a77 (AI-assisted; synthetic fixtures only, no game files).
Windows 11, MSVC 19.44, RTX 4070 Ti, NVIDIA 610.88. With LEONIDA_VK_VALIDATION=1, targeted CTest d3d12_null_pso_noop, d3d12_close_parity, d3d12_compute, d3d12_draw, d3d12_bundle, and d3d12_com passed (6/6). The null-PSO test reported eight WARP/layer Close matches, successful zero-work WARP and layer copies, successful nonzero layer copy, and zero validation errors. The 100-case Close parity test reported 0 failures (31 known differences).
Independent synthetic probes: native NVIDIA Close succeeded for all eight zero/nonzero cases; zero and nonzero Draw/Dispatch/ExecuteIndirect(DISPATCH) followed by a copy completed and the device remained alive. Layer negative controls preserved E_INVALIDARG for an invalid root argument and a null indirect argument buffer; Reset(nullptr) cleared the error. A bound compute PSO without a root signature still failed Close; Reset(nullptr) and ClearState(nullptr) restored null-PSO no-op behavior, and the compute fixture continued to pass with validation enabled.
Limits: WARP nonzero work was not submitted; indexed nonzero draw was checked at Close only. Indirect signatures that modify root arguments and their effects on later commands were not independently exercised. The M4 compute target was not generated because llvm-mc was unavailable. No full CTest run was performed.
No approval at this point: coordination records an unresolved overlap with #6945 (see #6750 and #6910), and the stateful indirect case remains unverified.
|
Heads-up, for the coordinator and both authors: #6945 (@KorahX365, opened 15:31) and #7007 (@lines9686-rgb, opened 15:40) both implement D3D-482. They change the same AI-assisted (Claude Code). |
|
AI-assisted verification of CTest passed 4/4: The null-PSO test passed all eight cases, including zero and nonzero |
|
Verified on Windows 11 (MSVC 19.44 / Ninja, Vulkan SDK 1.4.363.0) at
|
|
Tested
Synthetic fixtures only. AI-assisted. |
|
Thanks @dadsmallbuk1. For the record: @KorahX365 claimed D3D-482 at 15:19:26 and I claimed at 15:19:32, so their claim came first and I hadn't seen it.
It has been verified on RTX 5090, RTX 5070 Ti, the 9800X3D iGPU and my RTX 3060 Ti. @KorahX365, either way is fine with me. Keep #7007, or I rebase those three parts onto #6945 as a follow-up once it merges and close this one. I'll go with whatever you or the coordinator prefer. AI-assisted (Claude Code). |
|
Tested
|
|
Tested d0656b7 on a GeForce RTX 5050 (driver 610.88, Vulkan 1.4.341), Windows 11 25H2 (26200.9974), MSVC 19.52 Release. All four targeted tests passed: d3d12_null_pso_noop, d3d12_close_parity, d3d12_compute, and d3d12_draw. I followed up on the stateful ExecuteIndirect case. I set two root constants to (17, 29), then recorded CONSTANT + DISPATCH without a compute PSO, targeting only the first constant. After binding a PSO, a direct Dispatch read back (0, 29) on native D3D12 and (17, 29) on Leonida. The mismatch reproduced in all three runs. The dispatch-only and no-indirect controls matched on both backends. Synthetic fixtures only. Vulkan validation off. AI-assisted (Codex). |
|
Closing in favour of #6945 (@KorahX365 claimed D3D-482 first). The ExecuteIndirect no-op, the close-parity rows and the layer execution check are offered there: #6945. Thanks to everyone who tested this. |
…tLeonida#6945), ProjectLeonida#7007 was its duplicate Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GDgoLP2cV47KaCDkbmckob
Claim: #6750 (comment)
What native D3D12 does
Measured with a standalone probe (no Leonida code) on an RTX 3060 Ti (NVIDIA 610.88) and on WARP:
With the debug layer on, the runtime says "The runtime will use a default no-op pipeline state". So Close must succeed and the work does nothing. WARP removing the device is a WARP quirk, so the tests compare only Close with WARP.
Change
record_draw/record_dispatch: no PSO means return (no-op). With a PSO, a missing root signature or topology still fails Close, as before. This is pmilewsskiedu-gif's commit fromfix/d3d12-null-pso-noop-20261122, cherry-picked with authorship kept and rebased onto current main.d3d12_close_parity: the four "with nothing set" Draw/Dispatch rows go fromstrictertomatch.d3d12_null_pso_nooptest covers Draw, DrawIndexed, Dispatch and ExecuteIndirect(DISPATCH), zero and nonzero. On the Vulkan layer it also submits real null-PSO work and checks that a CopyBufferRegion recorded after it still runs.d3d12_compute_testexpectsClose() == S_OKfor a dispatch with no PSO.Testing (Windows 11, MSVC, RTX 3060 Ti)
Branch
d3d12-null-pso-noopon main1cc6e3c12, MSVC RelWithDebInfo, Ninja, NVIDIA 610.88.LEONIDA_VK_VALIDATION=1:d3d12_null_pso_noop,d3d12_close_parity,d3d12_compute,d3d12_drawandd3d12_m4_computepass, with no validation errors.ctest -j 1: 259 of 261 pass. The 2 failures also fail on main without this branch:d3d12_indirect_rtis fixed by d3d12: an ARRAY_OF_POINTERS entry below the arena is not an overflow (d3d12_indirect_rt on NVIDIA) #6010;d3d12_indirect_dispatch_countis fixed by d3d12_indirect_dispatch_count_test: its compute fixture reads the root UAV at s4:s5 (D3D-448 layout) #5792.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code