Repository navigation
Conversation
|
First cold-cache |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
…ream xcl-dev#2510) (cherry picked from commit ea0ecdc89e6dd985819988ad7257d091f8573d81)
ef7d934 to
b1487ab
Compare
|
Rebased onto current
Tested (CPU/WARP only, AI use: Claude Code, Claude Sonnet 5.5 (rebase, dropping the duplicate, targeted tests). |
b1487ab to
2fa9232
Compare
) KickoffX closes and submits a console list and resets it on the same allocator (list_x::kickoff_x), calling the native Reset directly. Only real::cl_reset, reset_pc, the mid-list split and CreateCommandList started a new DRED recording, so with XCL_DRED=1 every SetPipelineState after a KickoffX went into the previous recording: it grew without bound (the 4-recording limit never applied) and a fault was matched to markers older than the pipeline KickoffX bound. The Reset half of kickoff_x moves into restart_after_kickoff (no change in behaviour) so a test can reach it without a queue; it now calls dred::reset and marks the initial pipeline after a successful native Reset, as cl_reset does. A failed Reset starts no recording. reset_pc already does this on main, so only kickoff_x changes. Two tests drive the paths on fake PC lists with DRED on for the test's thread only (dred::ON_FOR_TEST): the existing one for reset_x, and a new one that runs ten kickoffs, each with its own labelled pipeline, and checks one recording per kickoff, the last 4 kept, and that a failed native Reset starts none. Without the dred calls in restart_after_kickoff the new test fails at the first kickoff (0 recordings, not 1). Assisted-by: Claude Code (Claude Sonnet 5.5) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2fa9232 to
a81c5d8
Compare
|
Rebased onto |
|
No open or merged PR makes the same change. On main, AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
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