D3D12.X: XCL_DRED=1 starts a recording at KickoffX's Reset (#2462) #2500
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2510"
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 ivall/xcl. Originally posted by oni-swr on 2026-11-25T21:09:37Z.
With
XCL_DRED=1,KickoffXnever started a new DRED recording.list_x::kickoff_xcloses and submits a console list and resets it on the same allocator, calling the native Reset directly. That bypassesreal::cl_reset, which callsdred::reset. So everySetPipelineStateafter aKickoffXwas appended to the previous recording: it grew without bound (the 4-recording limit never ran), and a fault was matched to markers older than the pipelineKickoffXbound.The Reset half of
kickoff_xmoves intorestart_after_kickoff(no change in behaviour) so a test can reach it without a queue. It now callsdred::resetand marks the initial pipeline after a successful native Reset, ascl_resetdoes. A failed Reset starts no recording.reset_pc(Reset #10/#139, and the stand-in list of a Reset while the last submit runs) already does this onmain, so it is not changed here.Fixes #2462
What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:restart_after_kickoff(the Reset tail ofkickoff_xmoved out, plusdred::resetanddred::mark_pipelineafter a successful native Reset).crates/xcl/src/hle/d3d12x/dred.rs: test-onlyON_FOR_TESTthread-local (DRED on for one test's thread only) andrecordings_for_test.list_x.rstestxcl_dred_starts_a_recording_with_the_initial_pipeline_at_each_kickoff: a fake PC list goes through 10 kickoffs, each with its own labelled initial pipeline. It checks one recording per kickoff holding exactly that pipeline, the last 4 kept oldest first, one marker per kickoff reaching the list, and that a failed native Reset (settle called withfalse,Errreturned) starts no recording.list_x.rstestxcl_dred_starts_a_recording_with_the_initial_pipeline_at_each_reset(guards thereset_xpath thatmainalready has): its marker counter is now per thread, so it does not race with the new test.Tested
XCL_ADAPTER=NONE_CPU_ONLY; no GPU test and no title was run for this head.cargo test -p xcl --lib -j 4 -- --test-threads=4 hle::d3d12x::dred:: xcl_dred list_x::tests::reseton heada81c5d8c: 7 passed, 0 failed, 0 ignored (2480 filtered out).dred::reset/mark_pipelinecalls inrestart_after_kickoffthe new test fails at kickoff 0 (0 recordings, expected 1); thereset_xtest still passes.cargo test -p xcl --lib hle::d3d12x -- --test-threads=4on the parent of this rebase (before it moved onto the newestmain): 1139 passed, 0 failed, 3 ignored; SKIPPED:two_pass_binds_set_the_shared_view_heap(no heap windows).cargo test --workspacedid NOT complete: it was stopped to free the GPU. Itsxcllib run aborted with a device removal (0x887a0006) in the GPU tests;gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1failed. I did not check whether that also happens onmain. The integration test targets that ran before the stop passed.Regression run
scripts/smoke.ps1 -Game <title folder> -Seconds 60, release builds, same title (menu only, no world load), RX 7800 XT (driver 32.0.31035.1003), one run after the other withXCL_PREPARE=0,XCL_NETWORK=0, a fresh isolated copy of the shader cache and of the title's user data per run, andXCL_DREDnot set.mainis227d2cb3, this PR's head isa81c5d8c(clean tree). The PR's run had 1577 frames, 99 % ofmain's 1597, with no device removal and no crash; its peak commit was 14560 MB against 14581 MB (100 %).main:This PR's head:
Not tested
XCL_DREDoff, so they show only that the PR breaks nothing with DRED off; they do not exercise the changed code (thekickoff_xtest does, on a fake list). No title run withXCL_DRED=1; no world load; no real device fault matched end to end.kickoff_xitself with a live queue: the test reaches the Reset tail throughrestart_after_kickoff, not the submit before it.AI use
main, moved the Reset tail ofkickoff_xinto a helper, wrote the new test, ran the tests and the paired smoke runs above and rewrote this description. The original fix was written with Claude Code (Claude Opus 5.5).🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T21:21:54Z.
First cold-cache
gpu_suite run:163 passed / 4 failed, the trio plusgpu_geometry_wave32_prefix_count_over_a_mask. Second run, same head:164 passed / 3 failed(baseline trio only). Solo runs of the wave32 test, twice: passed both. Known flaky family on this lane, unrelated to DRED recording; logging it so it is not attributed to this PR.Targeted run of
xcl_dred_starts_a_recording_with_the_initial_pipeline_at_each_reset: passed.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T21:24:02Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-28T07:15:30Z.
Rebased onto current
main(e429936c); new headb1487ab2.mainnow starts a DRED recording inreset_pcand in the mid-list split (db4dd270,list_x.rs), so I dropped that half of this PR. What is left iskickoff_x, which still resets the list withoutdred::reset/mark_pipeline. The test (xcl_dred_starts_a_recording_with_the_initial_pipeline_at_each_reset) drivesreset_x, so it now passes onmaintoo and does not cover thekickoff_xchange; I have not added akickoff_xtest.Tested (CPU/WARP only,
XCL_WARP=1, no retail title, no smoke run):cargo test -p xcl --lib -j 4 dred: 6 passed, 0 failed, 0 ignored. Full suite and regression run not repeated.AI use: Claude Code, Claude Sonnet 5.5 (rebase, dropping the duplicate, targeted tests).
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-28T23:23:21Z.
Rebased onto
main227d2cb3and pusheda81c5d8c. Onlykickoff_xis left (reset_pcis onmain); added a test for it (xcl_dred_starts_a_recording_with_the_initial_pipeline_at_each_kickoff, via a newrestart_after_kickoffhelper). CPU-only:cargo test -p xcl --lib -j 4 -- --test-threads=4 hle::d3d12x::dred:: xcl_dred list_x::tests::reset-> 7 passed, 0 failed, 0 ignored; the new test fails without thedred::resetcalls. The full workspace suite and the smoke blocks are not run for this head (still needed). Claude Code, Claude Sonnet 5.5.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:13:13Z.
Triage (#1607) – head
a81c5d8No open or merged PR makes the same change. On main,
kickoff_xstill resets the list without callingdred::reset, unlikereset_pcand the mid-list split, which already do. This PR moves the Reset tail intorestart_after_kickoffand starts the recording only after a successful native Reset.No problems found in the diff. The description says the
reset_xDRED test exists on main, but at this base it is new in this PR, so the description needs a fix.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.