D3D12.X: a graphics ExecuteIndirect waits for its pipeline at the submit, not in the call #2611
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2611
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2611"
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?
@KDenKC on GitHub · 2026-11-26 01:52 UTC · original
KDenKC:c12-gfx-ei→main· +466 −49 · 4 files · 2 commits · openPart of #2088 (C12, the graphics half of #2118). It also helps with the world-start stalls discussed in #505, a step on the #1833 roadmap.
A lazy graphics pipeline is sent to the workers by
SetPipelineState, but theExecuteIndirectrecorded right after it calls
pso_async::resolve_wait. That call takes the build before a workerhas started it and runs it on the title's thread. A title that records *bind A, ExecuteIndirect A,
bind B, ExecuteIndirect B…* therefore builds its graphics pipelines one after another on that
thread, and the thread can't bind B until A is built. With cold graphics blobs, a retail title's world
start stopped presenting for minutes this way: one unnamed title thread was inside the driver's
compiler, with 2–4 s builds about every 7 s, while the
xcl-pso-*workers sat idle (thread dumps inmy #2088 comment of 20:40Z; rafelis1997 measured 162 s on 17 ExecuteIndirect + 2 DispatchMesh calls).
#2118 already puts a dispatch whose pipeline is still being built off to a list segment recorded at
ExecuteCommandLists. This PR does the same for anExecuteIndirectthat draws. The title's threadgoes on to its next binds, the builds run on the workers together, and the submit waits for each one
as a bind did. The segment is recorded with the real pipeline before the GPU runs it, so no draw is
left out.
What is in it
Review fix
445129ba(luckyteagirl's descriptor-lifetime review): a put-off graphics call copies the bound RTV/DSV descriptors into small XCL-owned CPU heaps before the list is split, and the replay binds the copies. If that allocation fails, the call takes the ordinary path before any list is closed. Boundary: a descriptor rewritten betweenOMSetRenderTargetsand the draw is still read at defer time (native D3D12 copies atOMSetRenderTargets); capturing there is a separate follow-up.crates/xcl/src/hle/d3d12x/bind.rs:execute_indirectalso puts off a drawing call whosepipeline is still being built. Signatures that change root arguments are excluded, because a
translated pipeline skips them anyway.
tracked_psois no longer test-only.crates/xcl/src/hle/d3d12x/list_x.rs:splitkeeps the list's whole graphics state on the put-off segment: bindings, depth bias,index buffer, depth bounds.
record_deferredrestores that state after the segment's Reset (restore_bindingsand the newrestore_direct). For a drawing call it Resets the segment with its pipeline, waited for as abind did, so a call whose build failed goes to the PC with its stand-in bound, as it would have
in its list.
restore_directissplit's existing depth-bias / index-buffer / depth-bounds block, moved intoa helper both use. It is not changed.
A call is not put off while any query but a timestamp is open on the list, so Begin and End
stay in one PC list (an occlusion query would also not count a put-off draw). The count
carries across a mid-list Wait split.
The put-off segment keeps the title's pipeline as its
bound_pso, so binding the real onethere does not re-key it (depth bias).
crates/xcl/src/hle/d3d12x/device_x.rs,bind.rs: a command signature whose arguments only draw(Draw, DrawIndexed, DispatchMesh) is noted at its creation; only those calls are put off.
Vertex / index buffer views and root arguments an ExecuteIndirect sets stay on the list after it.
a_graphics_execute_indirect_with_a_pipeline_still_building_waits_at_the_submit.Side effects on #2118's compute path:
A put-off dispatch on a direct list now also gets the list's graphics state restored on its
segment. Dispatches don't read it.
A dispatch inside an open query (any type but timestamps) is no longer put off. Before, the split
ended an occlusion query early, and other query types had their Begin and End in different PC lists.
The log line is now
a call with a pipeline still being built put off to the submit.Tested
Review fix
445129ba, RTX 5090, debug,XCL_NETWORK=0. New testdeferred_graphics_keeps_render_targets_after_descriptor_overwriteagainst the old runtime (0d2517f0): 0 passed, 1 failed. The readback showed the draw in B ([255,0,0,255]) and A clear: it followed the overwritten descriptor. With the fix, it and…_after_descriptor_heap_releasepass (2 passed, 0 failed) on the RTX 5090 and on the Ryzen 7 9800X3D's AMD iGPU (RDNA2); each prints its adapter.list_x: 43 passed, 0 failed on each adapter (the iGPU with theXCL_ADAPTERfixture from #2622's review). Whole suite aftercargo build --workspace: 1,422 passed, 4 failed (the knownfuzz_validate_and_gpu_0..3, #1905), 46 ignored, 26 SKIPPED.Smoke on
445129ba, run twice (200 s, same recipe, fresh exe name each): 1,643 and 2,034 frames, no removals. In the lower run the world load started 28 s later (the put-off burst at 157.5 s vs 129.3 s), and both runs put off 128-255 calls. The block below is the second run; the first is available on request.RTX 5090 32 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11 Pro 26200, Rust 1.99.1, debug tests,
release build.
Trees: unit tests on
maine1d84b7with and without this change. The in-title A/B ran on 496dc74(=
e1d84b7+ #2404 @ 809da30, a local merge), with and without this change. #2404 is in both arms,and this PR is not stacked on it.
The new test fails on
main(ExecuteIndirect 0 waited for the build (10.0050257s), the titlethread ran the build) and passes with the change. Two held graphics builds run on the workers at
once, the submit waits for both, and an ExecuteIndirect inside an occlusion query stays in its list.
cargo test -p xcl --lib hle::d3d12x -- --test-threads=4: 254 passed, 0 failed, 2 ignored, noSKIPPED.
cargo test -p xcl --lib -- --test-threads=4on0d2517f: 1295 passed, 4 failed, 26 ignored.The 4 failures are
gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineState0x8007000E). They fail the same way onmaine1d84b7(same seeds 70/545/1019/1507, GPU idle):pre-existing, #1905. SKIPPED: the wave64 GPU tests (no wave64 on this card), three f16/f32 forms the
per-lane lowering refuses, and the driver-cache measurement (needs Developer Mode).
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on0d2517f(
--no-fail-fastbecause the lib binary's 4 pre-existing failures otherwise stop cargo before theintegration tests;
XCL_NETWORK=0): 1420 passed, 4 failed, 46 ignored over all 37 testbinaries. The 4 failures are the fuzz tests above (pre-existing, #1905).
SKIPPED (26 lines): 21 GPU tests or forms that need wave64 (no wave64 on this card); 3 f16/f32 forms
the per-lane lowering refuses (
V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32, #1426);heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows); andpso_measurement_compiles_an_exact_synthetic_record(disabling the driver cache needs Developer Mode).In-title A/B on 496dc74 with and without this change. Retail title, graphics driver blobs removed and
NVIDIA's cache cold (a new exe name), compute precompiled, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1
XCL_PSO_TRACE=1`, 200 s with the change (600 s without):
| | without | with |
|---|---|---|
| cold graphics builds on title threads after the world load starts (130 s) | 65 builds, 93 s in the driver, one at a time | 2 builds, 17 s |
| cold graphics builds at once (peak) | 6 | 18 |
| calls put off to the submit | 6 (dispatches, #2118) | ≥ 128 |
| draws skipped, GPU-wait timeouts, device removals in 0–200 s | 0 / 0 / 0 | 0 / 0 / 0 |
Measured with the first version of this change; the smoke run of
0d2517f(below) shows the same:≥ 128 calls put off and 2 title-thread graphics builds (17 s).
The time to the first world frame does not improve on this title yet. Both arms stop presenting
at 130 s. The next wall is cold whole forms of split compute programs (#2404): a title thread builds
them one after another (
Chain::whole, 15–24 s each), and the workers one at a time under thebig-compile gate. Raising
XCL_HUGE_PSO_WANTED_CONCURRENCYto 4 changed nothing. Measuring thatwall together with #2551 is separate work and not claimed here.
Tested by others (thank you):
RTX 4080, CryingLaughing: a DSV readback test (depth target A, CPU DSV slot overwritten to B before submit). It failed on
0d2517f0(the draw followed B) and passed on445129ba(A). #2611RTX 5070 Ti 16 GB, NWProgramming00,
mainb49be18vs this PR (445129b) merged, from identical cache copies, 600 s in the title: 980 presents after world entry with this PR, against 0 onmain; 3 graphics builds on a title thread vs 12; no removals. #2611AMD RX 9070 XT (RDNA4), DarkPanda69: the new test passes with no skip;
d3d12x::255 passed, 0 failed. #2611RTX 3090 Ti (Ampere), GodlyBDS, A/B with this change backported (warm native cache, 1 GiB shader-heap profile): Present #1,689 at 278.8 s against 534.7 s, longest frame gap 21.7 s against 252.0 s; one run per arm, both later stopped on memory pressure. #2611
RTX 3060 Ti, DavidM1911:
cargo test -p xcl --liball passed. #2611AMD RX 7900 XT (RDNA3), SlopTart, Linux + Wine/vkd3d-proton (RADV), head merged on current
main: the new test passes;gpu_suite 165 passed / 3 failed (the lane's known baseline, not this PR). #2611Regression run
main:This PR (
0d2517f):Both: the retail title,
-Seconds 200,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, the same scripted input to the world load, each on a copy of the same cache (compute precompiled, graphics driver blobs removed) under a never-used exe name. Both stop presenting at ~130 s, at the start of the world load (cold whole forms of split compute programs; see #2088).Not tested
The review fix's cost in the title: each put-off indirect graphics call creates up to two small CPU descriptor heaps (RTV and/or DSV). Not measured; the log does not count them.
Descriptor rewrites between
OMSetRenderTargetsand the draw remain outside this fix. (DSV copying is now covered by CryingLaughing's readback test, above.)AMD and Intel GPUs, other NVIDIA cards and drivers, Wine / vkd3d-proton.
Direct draws (
DrawInstanced/DrawIndexedInstanced) andDispatchMeshstill wait in the call.The measured pattern is ExecuteIndirect, and they are left for a follow-up.
State that
Bindingsdoes not carry is lost on a put-off segment, as on a mid-list Wait splittoday: shading rate and combiners, the shading-rate image, sample positions, the view-instance
mask, stream-output targets, and state an
ExecuteBundleset. Not checked whether the titleuses them on these passes.
The put-off path ignores the native
Closeresult of a segment (both when the empty segment is madeand after the call is recorded at the submit), so a segment whose recording failed would still be
submitted. This is pre-existing in #2118's code and was found by KOLESNiii on #2088; this PR sends more
calls through it. A separate fix with a failure-injection test is to follow.
A list predicated with plain
SetPredication(notSetPredicationBufferX) is not seen by thesplit, so a draw put off from it runs unpredicated (the same gap #2118 has for dispatches).
With defaults, the huge-compile gate lets at most
XCL_HUGE_PSO_WANTED_CONCURRENCY(2) wantedbuilds of ≥ 256 KB run at once. The gain with a higher cap is not measured here.
AMD test wanted: this has not run on AMD. A run on RDNA2/3/4 would help:
cargo test -p xcl --lib list_x -- --test-threads=4(the new test isa_graphics_execute_indirect_with_a_pipeline_still_building_waits_at_the_submit), and if you can,scripts/smoke.ps1on this head againstmain. Look for skipped draws or a device removal thatmaindoesn't have.AI use
Review fix: Codex (GPT-6.1-Sol) wrote the descriptor copy and the two GPU tests and ran the red/green checks; Claude Code (Claude Opus 5.5) ran the broader validation and the smoke runs and updated this description.
Claude Code (Claude Opus 5.5) found the cause from the code and logs, wrote the change, the test
and this description, and ran the tests listed above.
🤖 Generated with Claude Code
@DarkPanda69 on GitHub · 2026-11-26 02:28 UTC · original · edited 2026-11-26 09:10 UTC
Update for head
445129b: rerun onmainb49be18, same cards and--nocapture. On the RX 9070 XT, the default adapter here,a_graphics_execute_indirect_with_a_pipeline_still_building_waits_at_the_submitis ok and thedeferred_filter (the new render-target tests among them) gives 5 passed, with no SKIPPED.d3d12x::gives 257 passed, 0 failed, 2 ignored, no SKIPPED, on both the RX 9070 XT and the RTX 3060.AMD run (listed as untested): the new test passes on an RX 9070 XT, with no skip.
Head
0d2517fapplied onmainb49be18, debug, Windows 11 Pro 26200, RX 9070 XT (RDNA4, driver 32.0.32029.2010):cargo test -p xcl --lib -- a_graphics_execute_indirect_with_a_pipeline_still_building --nocapture:a_graphics_execute_indirect_with_a_pipeline_still_building_waits_at_the_submitok, no SKIPPED. The test makes its device on the default adapter, which is the RX 9070 XT here.cargo test -p xcl --lib -- d3d12x:: --test-threads=4: 255 passed, 0 failed, 2 ignored.Not tested: this test on the machine's RTX 3060 (it always uses the default adapter), a title, Intel, Wine / vkd3d-proton.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@DavidM1911 on GitHub · 2026-11-26 02:31 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.Thanks!
— Devin
@GodlyBDS on GitHub · 2026-11-26 02:34 UTC · original · edited 2026-11-26 02:58 UTC
Independent baseline for comparison on RTX 3090 Ti (Ampere), NVIDIA 621.40, Windows 10, 32 GiB RAM. This run used a locally instrumented XCL build based on
08294413, a warm but incomplete native PSO cache (6,234 entries at launch), a per-executable 1 GiB shader heap reserve, and no fixed run timer. The PR itself was not applied in this measurement.ExecuteIndirectPSO waits on 64 distinct scheduler IDs in that interval. Median wait was 5.465 s, maximum 11.340 s, and their sum was 373.302 s.This corroborates serial waits on distinct graphics pipelines on Ampere, in the same code path as the RTX 5090 report. An A/B on this GPU can compare eligible deferred calls, recording-time wait, submit-time wait, time to the next Present, and peak private memory under the same native cache.
AI use: OpenAI Codex (GPT-6) helped correlate scheduler and driver events and draft this report.
Ampere follow-up with the PR applied. I backported
0d2517f0onto the same local08294413-based texture-remap control, preserving the existing scheduler trace and adding separate timing for the submit-side wait. The two arms used the same verified 6,569 native cache entries, four DXC/PSO workers, and the same 1 GiB per-executable NVIDIA reserve. No fixed run timer. The PR's graphicsExecuteIndirectregression passed on the RTX 3090 Ti (1 passed, no skip), including its GPU pixel readback.The backport reached that point sooner in this pair. The launcher stopped it just afterward at 350 MiB available physical RAM with 6.88 GiB system commit headroom. The control later reached Present #1,720 and also stopped for physical memory pressure. Neither run had a matching device removal or Windows display reset. The capture through #1,676 still showed a loading spinner. No 3D world geometry was verified. The runs had different system memory headroom, so this pair cannot assign the earlier memory stop to the PR or establish an end-to-end improvement.
The timing identifies where the visible waits moved. The deferral count is per call, so the 104 deferrals represent 24 cold pipeline IDs, not 104 driver compilations.
Low-memory follow-up on the local two-pass mesh backport. With the same #2611 executable and native cache, disabling only
XCL_PSO_PRELOADreduced process-private memory by about 2.2 GiB at Presents #1,200 and #1,500 with similar texture-page usage. Later the run logged 685 graphics deferrals, 564 of themDispatchMeshcalls. Process private bytes grew from approximately 33.3 to 43.2 GiB across consecutive five-second samples. The first failure in this sequence wasE_OUTOFMEMORYallocating a 32 MiB two-pass record buffer, followed by more allocation failures,DXGI_ERROR_DEVICE_REMOVEDfrom native PSO creation, and process exit0xC0000409. There was no matching Windows display reset in the run interval. The final captured frame did not contain 3D geometry.This is from our older local baseline, which has a two-pass console mesh implementation. It holds one record buffer per PC command list, so deferring those commands into separate segments can increase scratch allocations. That mechanism is a hypothesis from the code and the timing. I am checking it separately by retaining classic draw deferral while keeping the emulated mesh path on its title recording.
Narrowed deferral retest. On the same local base with preload still off and the same 6,569 native blobs, I kept the emulated two-pass mesh signatures on the ordinary recording path and retained #2611 for classic draws. That is a one-condition change in the local backport. The original graphics-deferral GPU regression still passed, including pixel readback.
In the retest the runtime recorded over 8,192 two-pass mesh calls in its normal path, advanced past Present #1,536, and reached #1,544 at 163.446 s. It passed the previous 99 s failure without a 32 MiB scratch allocation failure, device removal, or matching Windows display reset in that interval. Near the previous failure point, XCL reported 9,801 MiB of target pages and 17,573 MiB of DXGI local usage in the retest, versus 9,787 MiB of target pages and 31,652 MiB local usage in the failed run. DXGI usage is a driver-reported accounting value, not a count of resident VRAM. The difference is consistent with the per-segment scratch concern. This retest corroborates the interaction with the locally combined two-pass mesh path and leaves upstream #2611's classic-draw benefit intact. It still has no confirmed 3D world frame.
@KDenKC on GitHub · 2026-11-26 04:02 UTC · original
AMD RDNA2 run of the new test, with the adapter shown. Head
0d2517f, debug, Windows 11 Pro 26200, on the integrated AMD Radeon(TM) Graphics of a Ryzen 7 9800X3D (RDNA2; driver version not recorded). Thelist_xfixture was temporarily changed (local, test-only, not part of this PR) to select the adapter withXCL_ADAPTERand print it:list_x fixture adapter: AMD Radeon(TM) Graphics; WARP=falsecargo test -p xcl --lib a_graphics_execute_indirect_with_a_pipeline_still_building -- --test-threads=4:a_graphics_execute_indirect_with_a_pipeline_still_building_waits_at_the_submitok, 1 passed, 0 failed, no SKIPPED.With @DarkPanda69's RX 9070 XT run, that is RDNA2 and RDNA4.
Not tested: RDNA3, Intel, a title run on AMD.
AI use: Codex (GPT-6.1-Sol) wrote the temporary fixture change and ran the test; Claude Code (Claude Opus 5.5) checked the log and wrote this comment.
@SlopTart on GitHub · 2026-11-26 05:29 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. This PR does not change the mad/mac red on RADV.Targeted run of
a_graphics_execute_indirect_with_a_pipeline_still_building_waits_at_the_submit: passed.Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
@KDenKC on GitHub · 2026-11-26 06:14 UTC · original
Thanks @luckyteagirl, you're right. A deferred graphics call keeps only the RTV/DSV CPU handles from
OMSetRenderTargets(note_render_targets), andrestore_bindingsbinds them again at submit. If the title rewrites or frees that descriptor between recording and submit, the replay binds whatever the slot holds by then. The mid-list split reads the same handles at record time, so there is no gap there; the gap is specific to the put-off draws this PR adds.I'll snapshot the descriptors when a draw is put off: copy them into a small XCL-owned CPU heap and replay from the copy. I'll add the test you describe: overwrite the slot between recording and submit, and check that the draw still lands in A. I'll post here when it is pushed.
AI use: Claude Code (Claude Opus 5.5) checked this against the head and wrote this reply.
@luckyteagirl on GitHub · 2026-11-26 05:56 UTC · original · reviewed
Could deferred graphics keep a snapshot of the RTV/DSV descriptors?
Bindingsretains CPU handles, andrestore_bindingsre-reads them throughOMSetRenderTargetsat submit. D3D12 permits immediate reuse of RTV/DSV descriptor memory after recording that call. A title can bind handlehas RTV A, record a deferred indirect draw, then overwritehwith RTV B before submit; replay binds B, whereas the original in-place list recorded A. The heap could also have been freed. A focused test could overwrite the slot between recording and submit and assert the draw still lands in A. Exact-head source review at0d2517f05ff600ab24419633b4f069243bac33d7; no GPU reproduction. AI-assisted review with Codex.@DavidM1911 on GitHub · 2026-11-26 08:29 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@KDenKC on GitHub · 2026-11-26 09:09 UTC · original
@luckyteagirl fixed in
445129ba, as promised in 7184224779. A put-off graphics call now copies the bound RTV/DSV descriptors into small XCL-owned CPU heaps before the split, and the replay binds the copies.list_xpasses 43/43 on each, and the whole suite shows only the known fuzz failures.One boundary is written in the code: a rewrite between
OMSetRenderTargetsand the draw is still read at defer time, where native D3D12 copies atOMSetRenderTargets. Capturing there needs per-binding copies, so it is a separate follow-up to keep this PR small.AI use: Codex (GPT-6.1-Sol) wrote the fix and tests. Claude Code (Claude Opus 5.5) ran the validation and wrote this reply.
xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590@NWProgramming00 on GitHub · 2026-11-26 11:53 UTC · original
One A/B pair on an RTX 5070 Ti, from identical cache copies. With this PR the title keeps presenting for 69 s after world entry, against 0 frames on
mainafter the same point. Most graphics builds after world entry run on the workers. Neither run reached world rendering, and the later stop with this PR coincides with cold compute builds, not graphics ones.Setup
XCL_NETWORK=0 XCL_ACTIVITY=1, A pressed byXCL_PRESS_A_AT(15–150 s, every 5 s),XCL_THREAD_DUMP_AT=300, 600 s per run. Retail title of #505.mainb49be18, andb49be18with this PR (445129b) merged locally (no conflicts).xcl shaders <pack> --precompile --only cs --used-only --pipelinesonb49be18(811 compute pipelines, 0 refused). I then copied the XCL cache folder twice (5.5 GB each) and gave each run its own copy throughXCL_DXIL_CACHE, so both started from the same XCL and driver blobs. Graphics driver blobs for this tree were cold in both.main. NVIDIA's own shader cache was not cleared between the runs, so any advantage from it went tomain.Results
mainb49be18#101(world entry)#101#101ungated here)xcl-psoworker (gated)main, presents stop within 2 s of world entry and do not come back. Graphics builds go on to the end of the run, 12 of them on a title thread.--used-only's list) started only at 369.7 s, 388.2 s and 417.1 s, after waiting 343, 375 and 401 s for the huge-build slot.What this does and does not show
XCL_DIRECT_DXIL=1, more runs, a smoke pair.AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on my machine, read the logs and wrote this comment. Logs stay local.
@CryingLaughing on GitHub · 2026-11-26 12:33 UTC · original
The DSV snapshot now has a native RTX 4080 readback comparison. I recorded a deferred indirect draw with depth target A, then overwrote only its CPU DSV slot to point to B before submission. The color target stayed fixed. A admits the triangle and reads back red (
ff0000ff). B rejects it and keeps the blue clear (0000ffff).0d2517f05ff600ab24419633b4f069243bac33d7445129ba178eebd7b168e7469080d067b40f0e95Both revisions matched both depth controls. No capability skips. The fixture used one RGBA8 pixel, D32_FLOAT depth clears of 0.75 and 0.25, a triangle at 0.5 with
LESS, and a fence before color readback. The device was verified as RTX 4080, driver 621.01, on an i5-13600K with Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC and DXC 1.8.2502.11. Overlay source SHA-256f121b8e633ded12e2799804c6d7014fe3050f4333d1964c929160c186c267e80.cargo test -p xcl --lib --locked -j 4 --no-run --message-format=jsonthenhle::d3d12x::list_x::dsv_replay_tests::deferred_graphics_keeps_depth_after_descriptor_overwrite --exact --ignored --test-threads=1 --nocaptureon each built test executable. This covers overwrite after deferral. The interval fromOMSetRenderTargetsto draw recording and retail behavior remain untested.@NWProgramming00 on GitHub · 2026-11-26 13:39 UTC · original
Follow-up to my A/B above. With this PR, the next wall on my machine is the huge-build gate, not the title thread. Builds a submit will wait for are still gated as unwanted, so on a machine with little free commit they build one at a time. A one-line local change doubles the rate.
Setup as above (RTX 5070 Ti, 31 GB RAM, commit limit 41.7 GB,
mainb49be18). This time I used this PR together with #2613 (2d229b9), and a--used-onlyprecompile with #2613's graphics warming: 23,215 compiled, 0 errors, 62 min. The cache copy came from the same state as before.What holds the frames with #2611 + #2613 (one 600 s run, thread dump at 450 s):
q_execute_command_lists → list_x::record_deferred → bind::execute_indirect → pso_async::resolve_wait.xcl-pso-*workers and the threexcl-pso-pre-*workers wait inbig_compile_turn. One worker is innvgpucomp64.dll.big_compile_commit_free(3 GB of free page file) stays false. A build is let through only once it iswanted.record_deferredwantsWANTED_AT_ONCEsegments ahead, but each submit here had one put-off call, so only one build at a time was wanted. The other put-off calls (need_by_submit) stay unwanted until their own submit waits for them.Local experiment:
need_by_submitalso callsp.want()the first time, behind a switch:The same run with it on, starting from the same cache copy (NVIDIA's own cache was not cleared, so I count only builds that took more than 0.5 s):
XCL_HUGE_PSO_WANTED_CONCURRENCYdefault.D3D12 device removed: 0x887a0005, with process commit at 30.2 GB.What I'd suggest checking: whether a put-off call's pipeline should count as wanted for the gate. A submit is going to wait for it anyway, and the wanted cap (2 by default) still bounds the driver's memory. I am not opening a PR for this. It touches your code path, and the removal needs a second look first.
Not tested: more runs, a run without #2613, AMD.
AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on my machine, read the logs and wrote this comment. Logs stay local.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.