Repository navigation
Runtime: ExecuteIndirect in a bundle is deferred to ExecuteBundle instead of failing the bundle's Close - #3298
Conversation
|
Independent Windows 11 26300 / MSVC 19.52 check of
No game files were used. — LocalFirst-AI |
|
Tested 3c65c32 merged onto main f847748 (clean merge) on RTX 4070 SUPER (NVIDIA 616.64) and Intel UHD 770 (101.7092), picked with
Code read: the bundle path checks the signature, a null argument buffer and a count buffer when it's called, then defers AI-assisted (Claude Code). |
|
Tested
AI-assisted (Claude Code). Synthetic tests only, no game data. |
|
Tested 3c65c32 on Windows 11, RTX 5080 (driver 616.92) and AMD Radeon iGPU gfx1036 (driver 26.10.1):
AI-assisted. |
|
Tested 3c65c32 merged onto main f847748 on an RTX 5090 (driver 616.92), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363, RelWithDebInfo:
AI-assisted (Claude Code). |
|
Tested
AI-assisted. |
…tead of failing the bundle's Close A bundle that recorded ExecuteIndirect failed its Close, and with it the list that ran it. The PC runtime accepts it (RTX 4060 Ti and WARP), except with a count buffer, which fails the bundle's Close there too. The call is now checked when recorded and played on the parent like the bundle's draws and dispatches. An indirect dispatch from a bundle runs with the parent's compute root signature and arguments, as on the PC runtime. An indirect draw is recorded as on a direct list, where the layer does not yet give it pipeline, render-target or vertex state. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
3c65c32 to
db674c9
Compare
|
Rebased onto #1865 has not landed, so an indirect draw still gets no graphics state on the layer and the three indirect-draw scenarios stay host-only; I will move them to the layer when it does. Re-run (RTX 4060 Ti, driver 32.0.16.2101, clang-cl 23.1.6 + xwin SDK 10.0.26100): Thanks @daemosofchaos and @CowBoYdu76 for the runs. AI-assisted (Claude Code); no game files. |
|
Tested db674c9 on RTX 5070, driver 616.86, Windows 10.0.26200: pass. Built |
|
Tested db674c9 on Windows 11 (MSVC BuildTools 2022, Ninja, RelWithDebInfo, -j 4; no Vulkan validation layer installed), one GPU at a time, device line confirmed: AMD Radeon RDNA2 iGPU (driver 26.10.1) and NVIDIA RTX 5080 (driver 616.92). Ran AI-assisted. |
|
Tested db674c9 merged with main d974c88 on Windows (MSVC 14.51, RelWithDebInfo, ninja): pass. ctest d3d12_com, d3d12_compute, d3d12_bundle and d3d12_bundle_forbidden 4/4 on RTX 4080 SUPER and on the UHD 770 selected with VK_LOADER_DRIVERS_DISABLE=nv and LEONIDA_VK_DEVICE=Intel; the tests print |
|
Verified against main 3faac55, where docs/d3d12_vulkan.md still lists ExecuteIndirect-in-bundle under Not deferred yet (verified verbatim) — an open gap this PR fills, and the branch merges cleanly. The recording-side logic reads coherently (count-buffer forms refused like the measured adapters, deferred record holding the signature and argument buffer so they outlive the bundle). This host runs no cmake builds and never runs wine, so d3d12_bundle_test/d3d12_com_test and the default-adapter/WARP measurements in the new doc text are unverified here; CI (pending) and a Windows/wine run carry that. Touches d3d12_com.cpp and d3d12_vulkan.md alongside #3293. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
Claimed in the coordination issue as: #3047 (comment) (new D3D item, the first of the two)
What and why
ExecuteIndirectin a bundle didreturn check(false), so the bundle'sClosefailed and so did any list that ran it;docs/d3d12_vulkan.mdlisted it as "not deferred yet". A follow-up to #2145.Measured on the PC runtime first (RTX 4060 Ti and WARP, the same on both):
ExecuteIndirect, oneDRAWargumentExecuteIndirect, oneDRAW_INDEXEDargumentExecuteIndirectwith a count bufferClosefails (the same call on a direct list is accepted and draws)ExecuteIndirect, oneDISPATCHargumentThe change
ExecuteIndirectmoves unchanged into a privaterecord_execute_indirect. In a bundle the signature, a null argument buffer and a count buffer are checked when the application calls it (a count buffer fails the bundle, as measured); the call is then deferred like the bundle's draws, holding the signature and argument buffer until the bundle is reset. What depends on the parent (a dispatch's compute pipeline and root signature) is checked whenExecuteBundleplays it, so a failure there fails the parent'sClose.What this does not do — please read
ExecuteIndirectcarries a pipeline only for a dispatch; a draw gets no pipeline, render targets or vertex state, and replay is a barevkCmdDraw*Indirect. That gap is onmainand is not touched here; before this change a bundle with an indirect draw failed atClose, now it records what a direct list records. The two indirect-draw scenarios and the count-buffer control are therefore compared between the two host adapters only, and the test's summary line counts them separately as host-only. The doc now says this in one sentence.Tested
Windows 11, NVIDIA GeForce RTX 4060 Ti (driver 32.0.16.2101), clang-cl 23.1.6 with the xwin SDK (10.0.26100), run natively. No game files; synthetic shaders only (one new GLSL compute shader, its HLSL twin compiled on the host).
d3d12_bundle: 13 scenarios on the layer and 3 host-only, each against the PC runtime on the RTX 4060 Ti and on WARP, 0 failures. New: two indirect-dispatch scenarios (layer and both adapters), the two indirect-draw scenarios and the direct-list count-buffer control (hosts only), and the count-buffer refusal (layer and both adapters).main'sd3d12_com.cppthe new bundle scenarios fail on the layer with "bundle Close failed".d3d12_com: a new block with reference-counted fake buffers checks the hold and release of the argument buffer, the record-time refusals, and that a deferred dispatch without a compute pipeline on the parent fails the parent'sClose(layer only; not tried on the PC runtime).ctest: all pass exceptd3d12_subgroup, which my toolchain can't build (no AMDGPU target inllvm-mc);d3d12_m4_computeis in the same position, which is why the dispatch scenarios live ind3d12_bundle.This and #3255 edit the same long line of
docs/d3d12_vulkan.md; I will rebase whichever is second.AI-assisted (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (not a translator change)🤖 Generated with Claude Code