D3D12.X: XCL_DRED=1 starts a recording at a console list's Reset (#2462) #2510
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!2510
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@oni-swr on GitHub · 2026-11-25 21:09 UTC · original
oni-swr:t3/xcl-fix-2462-dred-reset-leak→main· +127 −0 · 2 files · 1 commits · draftWith
XCL_DRED=1, a console command list's Reset never started a new DRED recording. Reset #10, and #139 on the newer layout, goestitle_list::reset/list_x::reset_x→list_x::reset_pc, andKickoffXresets inlist_x::kickoff_x. Both call the native Reset directly, bypassingreal::cl_reset, which is the only Reset path that callsdred::reset. So everySetPipelineStateof every frame was appended to the list's first recording. That recording grew without bound (the 4-recording limit never ran), and a fault was matched to frame 1's markers, without the pipeline that Reset or KickoffX bound.reset_pcandkickoff_xnow calldred::resetafter a successful native Reset and mark the initial pipeline, the same waycl_resetdoes.reset_pcis also the path for the stand-in list of a Reset made while the last submit is still on the GPU (reset_stand_in). A failed Reset still returns before any of this, so it starts no recording.Fixes #2462
What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:dred::reset+dred::mark_pipelineafter the native Reset inreset_pcand inkickoff_x.crates/xcl/src/hle/d3d12x/dred.rs: test-onlyON_FOR_TESTthread-local, which turns DRED on for one test's thread so other tests' fake lists are never marked, andrecordings_for_test.list_x.rstestxcl_dred_starts_a_recording_with_the_initial_pipeline_at_each_reset: a fake PC list goes through 10reset_x"frames", each with its own labelled initial pipeline and 3 binds. After each frame the test checks four things: the number of recordings ismin(frame + 1, 4); the newest recording holds exactly that frame's 4 markers; its first label is that frame's initial pipeline; andbound_atfor a fault at the first dispatch names it. The test also checks that the initial pipeline'sSetMarkerreached the list (40 markers).Tested
XCL_ADAPTER=NONE_CPU_ONLY, no GPU test was run.cargo test -p xcl --lib -- --test-threads=4 hle::d3d12x::dred:: list_x::tests::reset_commits list_x::tests::xcl_dred: 6 passed, 0 failed, 0 ignored (1319 filtered out).reset_pchunk removed, the new test fails in frame 0:left: 3, right: 4(the recording has the 3 binds but not the Reset's pipeline).cargo test --workspace --no-run -j 4: builds.cargo clippy --all-targets -p xcl: nothing on the changed lines. It exits with 3 existingapprox_constanterrors ingpu/dxil/lower_valu.rs,gpu/dxil/lower_wide.rsandgpu/recomp/lower.rs, files this PR does not touch.rustfmt --check(edition 2021): the added lines are clean. The files as a whole are not, as before.Regression run
scripts/smoke.ps1 -Game <title folder> -Seconds 60, release builds, same title, RX 7800 XT, run one after the other on the same machine, withoutXCL_DREDset.mainisb49be183(newer than this PR's merge base6d12f58a), this PR's head isef7d9349(clean tree). The PR's run had 1537 frames, 98 % ofmain's 1563, with no device removal and no crash; its peak commit was 15972 MB against 15808 MB (101 %).main:This PR's head:
Not tested
XCL_DRED=1, so it shows that the PR breaks nothing with DRED off; it does not exercise the changedreset_pc/kickoff_xcode. No title run withXCL_DRED=1was made.cargo test --workspacesuite: the author's pass above was CPU-only.kickoff_xhunk has no unit test:KickoffXneeds a live queue to submit to. It mirrors thereset_pcone.AI use
🤖 Generated with Claude Code
@SlopTart on GitHub · 2026-11-25 21:21 UTC · original
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.@DavidM1911 on GitHub · 2026-11-25 21:24 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. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
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.