D3D12.X: fix console_list::cl_reset initial PSO/rollback, oversized push, and null constants #1477
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!1477
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@b3IKK on GitHub · 2026-11-24 16:41 UTC · original
b3IKK:d3d12x/console-list-reset-and-bounds→main· +100 −16 · 1 files · 1 commits · openFixes 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.github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@futurepro62 on GitHub · 2026-11-24 16:59 UTC · original · edited 2026-11-24 17:07 UTC
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
@DavidM1911 on GitHub · 2026-11-24 18:53 UTC · original
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!
@oni-swr on GitHub · 2026-11-25 17:09 UTC · original
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.@throny on GitHub · 2026-11-25 18:10 UTC · original
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.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.