Repository navigation
Conversation
…-dev#2462) A console list's Reset (xcl-dev#10, and xcl-dev#139 on the newer layout) reaches its PC list through title_list::reset / list_x::reset_x -> list_x::reset_pc, and KickoffX resets the list in list_x::kickoff_x; both call the native Reset directly. Only real::cl_reset (the PC path), the mid-list split and CreateCommandList started a new DRED recording, so with XCL_DRED=1 every SetPipelineState of every frame went into a console list's first recording: it grew without bound (the 4-recording limit never applied), and a fault was matched to frame 1's markers, without the pipeline the Reset or KickoffX bound. reset_pc (also used for the stand-in list of a Reset while the last submit runs) and kickoff_x now call dred::reset and mark the initial pipeline after a successful native Reset, as cl_reset does. A failed Reset starts no recording. The test drives reset_x on a fake PC list with DRED on for its thread only (dred::ON_FOR_TEST). Without the change it fails at the first frame: the recording holds 3 markers (the binds), not 4 (the Reset's pipeline too). Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oni-swr
marked this pull request as draft
November 25, 2026 21:09
|
First cold-cache |
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
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
xcl-smokeblocks, onmainand on this PR's head, will be added before this PR leaves draft. Until then thePR descriptioncheck is expected to fail.Not tested
cargo test --workspacesuite on a GPU,scripts/smoke.ps1, and any real title withXCL_DRED=1. This was a CPU-only pass.kickoff_xhunk has no unit test:KickoffXneeds a live queue to submit to. It mirrors thereset_pcone.AI use
🤖 Generated with Claude Code