D3D12.X: fix console_list::cl_reset initial PSO/rollback, oversized push, and null constants #1467
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1477"
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 b3IKK on 2026-11-24T16:41:37Z.
Fixes three safety and correctness bugs in
crates/xcl/src/hle/d3d12x/console_list.rs:cl_resetwipedst.chunks,st.arena,st.allocator, andst.umabefore calling the PC list'sReset(destroying recording state if PCResetfailed) and never recorded aPIPE_MARKERpacket when a non-null initialConsolePsowas passed (causingclose()to start withpso = Noneand silently skip dispatches until a laterSetPipelineState).pushallocated a fixedCHUNK-byte buffer even when4 * words.len()exceededCHUNK, overflowing the heap buffer oncopy_nonoverlapping.cl_set_root_constantsdereferenceddatawithout checkingdata.is_null()whenn > 0.This calls PC
Resetbefore clearing state and emitscl_set_pipeline_statefor non-null initial PSO on success, sizes new chunks toCHUNK.max(min_bytes + SLACK)vianew_chunk_of, and guardsdata.is_null()incl_set_root_constants.What is in it
crates/xcl/src/hle/d3d12x/console_list.rs: fixcl_resetordering and initial PSO recording, sizenew_chunk_offor oversizedpushrecords, guarddata.is_null()incl_set_root_constants, and add unit testscl_reset_preserves_state_on_pc_failure_and_records_initial_pso_on_success(verified failing before the fix) andpush_oversized_record_and_null_root_constants_are_safe.Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 772 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2no wave64—gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware)cargo test -p xcl --lib console_list: 8 passed, 0 failed (cl_reset_preserves_state_on_pc_failure_and_records_initial_pso_on_successfailed before the fix)Regression run
main:
PR:
Not tested
AI use
console_list.rs, wrote the fixes and unit tests, ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T16:59:21Z.
Full-suite run, since this PR has no test report yet. Tested exact head
86df8e8(on its baseb7aa9f3).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 772 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.cl_reset_preserves_state_on_pc_failure_and_records_initial_pso_on_success,push_oversized_record_and_null_root_constants_are_safe.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 772 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:17Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
upstream-sync referenced this pull request2026-11-25 07:04:28 +00:00
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T17:09:49Z.
amd-win test report for
86df8e85(exact head86df8e857eed6f5f2789c3da345c2b2baf0e6de2) on AMD Radeon RX 7800 XTTested
main; the merged tree was not tested). Merges cleanly intoorigin/main55d64c27(git merge-tree)cargo test -p xcl --lib console_list: 8 passed, 0 failed (includes the two new testscl_reset_preserves_state_on_pc_failure_and_records_initial_pso_on_successandpush_oversized_record_and_null_root_constants_are_safe)cargo test --workspace -- --test-threads=4: 772 passed, 0 failed, 41 ignored; no SKIPPED lines printedRegression run (own test title
tests/testtitle, 60 s, release; same title and time for both. The test title exits with code 2 by design and shows no frames, socrashes: 1is its normal exit and is the same on both)PR head:
main(b7aa9f3):Not tested
mainAI use
oni-swr. No code was changed.Imported from ivall/xcl. Originally posted by throny on 2026-11-25T18:10:49Z.
Two contributors checked independently and found that #806 solves the same problem in a different way: #1607, group D101. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:44:18Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:53:34Z.
Triage (#1607) – head
86df8e8#806 makes the same oversized-record fix in
console_list.rs(push/ new chunk ofCHUNK.max(need + SLACK)bytes). This PR has all of it, plus three more fixes:cl_resetno longer clears the recorded stream when the PC reset fails.cl_resetrecords the initial PSO as aPIPE_MARKER;closestarts withpso = None, so this matters.cl_set_root_constantsignores nulldata.None of these fixes is on main. The PR conflicts with main's
cl_reset, which now callstitle_textures::forget_list_closedandforward_reset; keep both when rebasing.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.