D3D12.X: fix use-after-move in device init, silence deprecation #1686
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1696"
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 saurabhbhoir456 on 2026-11-24T19:22:31Z.
What changes and why
Two independent fixes in the D3D12.X subsystem:
Fix use-after-move in device initialization wave mode logging (
crates/xcl/src/hle/d3d12x/real.rs)device.into_raw(), which consumesdevice&deviceis valid forwave32_only_for_deviceandgraphics_wave32_for_devicequeriesSilence deprecation warning for
Atomic::try_update(crates/xcl/src/hle/xgameruntime/mod.rs)Atomic::fetch_updatewas renamed totry_updatein Rust 1.81XUserCloseHandleto use the new method nameWhat is in it
D3D12.X: fix use-after-move in device initialization wave mode logging(real.rs)D3D12.X: silence deprecation warning for Atomic::try_update(xgameruntime/mod.rs)Tested
cargo build --workspace; cargo test --workspace -- --test-threads=4Regression run
scripts/smoke.ps1 -Game <folder>on main and this branch head and paste both xcl-smoke blocks.Not tested
AI use
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-24T21:43:22Z.
Regression run of
56f53699on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 101 % of
main's frames, 99 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.Imported from ivall/xcl. Originally posted by MiharaxD on 2026-11-24T21:44:12Z.
Test report on an NVIDIA card, head
56f5369(onmain384f7f7), which covers the "NVIDIA" line.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4(debug) on56f5369: 737 passed, 0 failed, 41 ignored (lib tests 694 / 0 / 21).gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64).XCL_SPLIT_WAVE64).Regression run
scripts/smoke.ps1 -Game <game folder> -Seconds 60(release builds, start screen, no input).mainisc160d86:main:
this PR's head:
Not tested
XCL_SPLIT_WAVE64=1.AI use: Claude Code (Claude Opus 5.5) built the PR, ran the tests and both smoke runs, read the logs and wrote this report; I checked it before posting.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:02:47Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.Thanks!
upstream-sync referenced this pull request2026-11-24 23:06:49 +00:00
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:26:01Z.
XCL PR #1696 verification
Clean detached head
56f53699d6b19ee018c4aa942ae6a7b5b4a23119. Changed files arecrates/xcl/src/hle/d3d12x/real.rsandcrates/xcl/src/hle/xgameruntime/mod.rs.Tested
STOR-WINLAB ran Windows 11 Enterprise Evaluation build 26200 on an AMD Ryzen 7 3800X and Intel Arc A770 with driver 32.0.101.9175.
dxc.exe --versionreported 1.9.2609.5. Rust wasrustc 1.100.0 (0ef1bc386 2026-11-09)forx86_64-pc-windows-msvc. Unoptimized builds disabled debug info and incremental compilation.cargo build --workspaceandcargo test --workspace --no-runboth exited 0 outside the Arc lock, with 0 compiler warnings each. The test build produced 18 executables, with theXUserCloseHandledeprecation warning absent.cargo test -p xcl --lib hle::xgameruntime::tests::user_add_and_queriespassed and exercisedXUserCloseHandlewithXCL_ADAPTER=NONE_CPU_ONLYoutside the lock.cargo test -p xcl --lib gpu::recomp::tests::gpu_uma_import_check_at_initandcargo test -p xcl --test sparse_reiniteach passed underInvoke-ArcTest.ps1withXCL_ADAPTER=A770. Device init reported UMA importokand loggedcompute_wave32=true, graphics_wave32=true, split_forced=false. Each focused run had 1 passed, 0 failed, 0 ignored and 0 skips.cargo test --workspace --no-fail-fast -- --test-threads=4run under the Arc lock withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1exited 101. Summing all 19test result:lines inpr1696-suite.loggives 721 passed, 16 failed and 41 ignored across 18 binaries and one doctest harness. All three focused tests also passed in this run.Workspace failures and skips
CreateComputePipelineStateerror0x80070057. Four reported output mismatches in FMA overflow, mip sampling, 16-bit VALU and whole-wave pixel reductions.RSSetDepthBiasXcheck. The top-right pixel was blue instead of green.SKIPPED. Two cite wave64, two cite missing D3D12 debug-layer components and one cites tiled resource tier. These paths provided no coverage.Not tested
Matched
mainbaseline, retail-title smoke, retail sample fixtures, other GPU vendors and forced split-wave mode.AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1696-suite.logand published.upstream-sync referenced this pull request2026-11-25 19:07:20 +00:00
Imported from ivall/xcl. Originally posted by CalvyPZ on 2026-11-25T22:45:23Z.
This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:44:42Z.
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-01T06:31:14Z.
Triage (#1607) – head
56f5369This PR has two unrelated changes, and open PRs already make both:
xgameruntime/mod.rs::XUserCloseHandlefetch_update->try_updateis the same one-line diff as #3087 (and closed #2201).real.rs::initis the #1407 diagnostic that #1410 adds (opened earlier, logged once per process with the reason, with a unit test).The title says it fixes a use-after-move in device init, but main has no wave-mode log at all, so nothing is moved before use there: the diff only adds a new log line.
Recommendation: close (duplicate of #1410 and #3087).
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T18:54:29Z.
Closing as superseded: the same change is in #1410 (open, mergeable, required checks green). From Foniass's rechecked close list on #1607, checked again by script just now. If something here is still missing, say so and reopen it, or ask and I will.
AI use: Claude Code (Claude Opus 5.5).
Pull request closed