Repository navigation
d3d12: a draw or dispatch with no pipeline state bound is ignored, not a failed list - #9071
evilclanker9000 wants to merge 1 commit into
Conversation
…t a failed list record_draw/record_dispatch made Close return E_INVALIDARG when no graphics or compute pipeline state was bound. D3D12 without the debug layer closes such a list and the call draws nothing (WARP, measured by d3d12_close_parity_test), and one failed Close fails the whole ExecuteCommandLists, so the layer dropped a submission D3D12 runs: a title that records a draw before its pipeline state is set loses that frame's work. Both calls now record nothing and log it once through note_once; a missing root signature or topology with a pipeline state bound is still refused (that combination has not been measured). The four parity cases move from the known-difference table to match (113 cases: 78 matches before, 82 after, 20 layer-stricter before, 16 after), and docs/d3d12_vulkan.md carries the new counts.
al3xar
left a comment
There was a problem hiding this comment.
AI-assisted review and test.
Independent verification of 9d6e78fa3 on Windows 11 x64 (es-ES), MSVC 19.44.35230.0 (RelWithDebInfo, -DLEONIDA_REQUIRE_VULKAN=ON), NVIDIA GeForce RTX 3060 (driver 621.24, Vulkan SDK 1.4.363.0), no game files used: pass.
- Merge & hygiene: Merges cleanly with
upstream/main(867d922f0,git merge-treeexit 0);python -I scripts/check_no_game_data.pyclean. - Build:
d3d12_close_parity_testandd3d12_compute_testbuilt cleanly with MSVC/W4(no new warnings). - Tests (
LEONIDA_VK_VALIDATION=1):d3d12_close_parity_test: pass, 0 validation errors (113 cases, 82 match WARP, 16 known layer-stricter, 15 known layer-looser, 0 not run, 0 where WARP differs from the measured column, 0 failures).d3d12_compute_test: pass, 0 validation errors.
- Negative control: Reverting
runtime/shims/d3d12_com.cpptoupstream/maincausesd3d12_close_parity_testto fail on all 4with nothing setcases (78 match WARP, 4 failures, exit 1) andd3d12_compute_testto fail atline 565: SUCCEEDED(list->Close())(exit 1). - Code & docs check: Skipping
record_draw/record_dispatchvianote_oncewhen no pipeline state is bound while still failing on missing root signature/topology matches the WARP parity measurements, anddocs/d3d12_vulkan.mdcounts matchd3d12_close_parity_test.
Grimkaaah
left a comment
There was a problem hiding this comment.
Independent Linux CPU review
What changed: d3d12 — a draw or dispatch with no pipeline state bound is ignored, not a failed list.
Checked: diff review of d3d12_com.cpp + test tweaks (no local runtime build).
Looks correct; no game files.
|
Tested
Note: this test's reference column is WARP; it doesn't put the NVIDIA hardware driver next to it, so this confirms the layer change on an NVIDIA Vulkan device, not a second hardware host's answer. Synthetic tests only, no game files. AI-assisted (Claude). |
|
Independent verification on the retail executable, AMD (RX 7900 XTX, AMD's Windows Vulkan driver), from the frame-loop state all four machines now reach (tibzejoker's The cascade this PR breaks, measured with a one-call diagnostic on With the skip: a 240-s run on the GPU, killed by the harness budget with the title still running — zero exceptions, zero list invalidations, One addition worth considering, from the same measurement: the unrecognized-object diagnostic showed the title legitimately holds secondary-interface pointers (a QI answer at Format/slot numbers and outcomes only; no game data. AI-assisted. |
Claimed in the coordination issue as: EGEN-PSO-MISSING-DRAW (#8868 (comment))
Depends on: none
What and why
record_drawandrecord_dispatch(runtime/shims/d3d12_com.cpp) madeClosereturnE_INVALIDARGwhen a drawor dispatch was recorded with no graphics or compute pipeline state bound. Without the debug layer, D3D12 closes that
list and the call does nothing:
d3d12_close_parity_testmeasures it on WARP forDrawInstanced(3),DrawInstanced(0),Dispatch(1, 1, 1)andDispatch(0, 0, 0)"with nothing set". One failedClosefails the wholeExecuteCommandLists, so the layer dropped a submission D3D12 runs: a title that records a draw before its pipelinestate is set (a placeholder draw while loading, or a pipeline whose creation failed) lost that frame's work, and the
window kept the previous frame or the clear colour.
The two calls now record nothing and log it once through
note_once, the way the layer already treats a draw with noviewport. A draw with a pipeline state but no root signature or no topology is still refused: that combination is not
in the measured column.
The four parity cases move from the known-difference table to
match,d3d12_compute_test's misuse case expects theclosed list instead of a refused one, and
docs/d3d12_vulkan.mdcarries the new counts. This is a layer-correctnesschange measured against WARP; it is not a claim about a game frame or a boot phase.
Tested
Windows 11, NVIDIA GeForce RTX 5080, driver 32.0.16.1692, Vulkan SDK 1.4.363.1, MSVC 19.44, RelWithDebInfo, base
main867d922f0.ctest -R d3d12_close_parity, after:113 cases, 82 match WARP, 16 known layer-stricter, 15 known layer-looser, 0 not run, 0 where WARP differs from the measured column, 0 failures. The fourwith nothing setrows arematch(
0x00000000/0x00000000).record_draw/record_dispatchhunks reverted (the base behaviour)reports
113 cases, 78 match WARP, 16 known layer-stricter, 15 known layer-looser, 4 failures; the four rows return0x80070057where WARP returned0x00000000. Restored, it is 82 matches and 0 failures again.d3d12_compute_test: pass, including the misuse case that now expectsCloseto succeed.ctest -C RelWithDebInfo: 272 of 275 run tests pass, includingd3d12_draw,d3d12_m2_textured,d3d12_m3_frame,d3d12_translated_draw,d3d12_msaa_draw,d3d12_depth24_draw,d3d12_clear,d3d12_bundle,d3d12_bundle_forbidden,d3d12_gcl8andcommand_list. The three that failed are unrelated:d3d12_vulkan_deviceandd3d12_depth_resolvealso fail when rerun alone on this host without this change (theearlier targeted ctest run at 20:01 fails the same two), and
d3d12_bindless_churn_validatedlost its temporaryindex.jsonwhile other tests were running from the same temp folder; rerun alone it passes.AI-assisted: yes (Cline).
Checklist
docs/design.md, with how it was confirmed.Tag: SHAYDERRR