D3D12.X: fix use-after-move in device init; KBM: per-device absolute mouse #1522
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!1522
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1522"
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?
@saurabhbhoir456 on GitHub · 2026-11-24 17:15 UTC · original
saurabhbhoir456:fix/wave-mode-logging-unaligned-read→main· +124 −8 · 4 files · 4 commits · openWhat changes and why
Two independent fixes:
D3D12.X: fix use-after-move in device initialization (
crates/xcl/src/hle/d3d12x/real.rs)device.into_raw(), which consumesdevice&deviceis validD3D12.X: silence deprecation warning (
crates/xcl/src/hle/xgameruntime/mod.rs)Atomic::fetch_updaterenamed totry_updatein Rust 1.81XUserCloseHandleto usetry_updateKBM: track absolute mouse position per device (
crates/xcl/src/hle/kbm.rs)last_absfromOption<(i32, i32)>toHashMap<usize, (i32, i32)>keyed by Raw Input device handlereset()now clears the map instead of settingNoneWhat is in it
D3D12.X: fix use-after-move in device init, silence deprecation(real.rs, xgameruntime/mod.rs)KBM: track absolute mouse position per device(kbm.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
🤖 Generated with Claude Code
@pickles976 on GitHub · 2026-11-24 17:18 UTC · original
Review (issue author side): the line fires at device creation with all three decision values — that is the acceptance as written — but it drops the one field the originating evidence needed: the received wave range itself. The failure class behind #1407 (Marvisak/VIctory#1086 row 2) turns on why the decision fired:
range=(32,32)(device genuinely can't wave64),range=(32,64)with a forced split (environment), andrange=unknown → assume split(the fail-safe) are three different worlds for triage, and fromcompute_wave32=truealone they are indistinguishable — which re-creates the "assumed, not logged" gap the issue exists to close. Suggested one-line amendment: append the rawOPTIONS1values orunknownverbatim, e.g.wave mode: range=(32,32) compute_wave32=true graphics_wave32=true split_forced=false. Everything else in the line stays. (Non-blocking scope note: theis_adoptedunaligned-read fix is unrelated to the diagnostics and deserves its own changelog line for whoever bisects alignment bugs.)@upipibi on GitHub · 2026-11-24 17:47 UTC · original
Two things on this head (
1802d25):b11945f"KBM: fix camera whip on focus regain, add absolute mouse support" changeshle/kbm.rs(+72 / −4) andvfs.rs(+25 / −1), which is #963's area, not #1407's or #1434's. Since the description says nothing here was built, that commit is untested too. It may be better as its own PR.pso.rs. This PR logs the device's wave modes once atinit(). They don't conflict in code, but #1407 asks for one of them.AI use: Claude Code (Claude Opus 5.5) read the diff and wrote this.
@pickles976 on GitHub · 2026-11-24 18:21 UTC · original
Agree with the split — and sharpening the ask using this repo's own standard: a PR whose description says nothing was built is reviewable as text, but an undeclared +72/−4
kbm.rsfunctional change (camera whip + absolute mouse) rides in under a startup-logging description nobody scrutinized for input behavior. That is the same discipline I applied on #1526 — a PR should carry only what its description defends — and the "not tested" label plus the wrong-area commit means it is untested AND unowned in review terms. The fix is mechanical:b11945fbecomes its own PR with repro notes for the camera-whip symptom (which title, which focus transition) so the input lane can own it. On the #1410 overlap: yes, #1410 (wave64 form per program class,pso.rs) and this PR both build startup-logging on top of #1407's workstream — author merge is fine and preferred here; the one thing I would keep whole is the received-range field amendment from my review, whichever PR ends up carrying the wave line, so #1412'-style triage ("adapter advertised X, we chose Y") stays possible from one log line.@DavidM1911 on GitHub · 2026-11-24 18:54 UTC · original
Test report — RTX 3060 Ti (Windows 11): does not compile, even before merging with
main.cargo test -p xcl --libfails incrates/xcl/src/hle/kbm.rs:There's a stray extra
}right after thereset_clears_last_abstest (~line 618) — themod testsblock gets closed twice. Present in the PR head itself, not a merge artifact.@throny on GitHub · 2026-11-25 00:51 UTC · original
Two contributors checked independently and found that #1059 #1066 solves the same problem (for #963) in a different way: #1607, group D66. 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.
@throny on GitHub · 2026-11-25 01:01 UTC · original
Two contributors checked independently and found that #1139 solves the same problem (for #1130) in a different way: #1607, group D67. 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.
@Toons29 on GitHub · 2026-11-25 03:33 UTC · original
Regression run of
457fc240on 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.@winne42 on GitHub · 2026-11-25 07:00 UTC · original
At head
457fc24, the new testvelocity_update_uses_real_dt_for_rate_clamped_for_smoothingfails:The second step expects about 2500 after a single
update(10, 0, 0.004), but withSMOOTHING = 0.03one 4 ms step moves the velocity only bya = 1 - exp(-0.004 / 0.03) ≈ 0.125of the way (9.6 + 0.125 × 2490 ≈ 320): the expectation does not match the smoothing. The other 9kbmtests pass.Checked on Linux, Wine 10.0, Rust 1.98.1 (
x86_64-pc-windows-gnu), as part of the D66 check on #1607. Written with Claude Code (Claude Opus 5.5).@DavidM1911 on GitHub · 2026-11-26 00:23 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main(previous head had a compile error; that is fixed):cargo test -p xcl --lib: 2 real failures, deterministic (also fail--test-threads=1, 1306/2):The VFS UNC canonicalization now returns
Translatedwhere the test expectsGame— likely a real regression from the latest push, unrelated to the KBM change.— Devin
@gut0to on GitHub · 2026-11-24 17:16 UTC · original · edited 2026-11-24 17:18 UTC
On
crates/xcl/src/hle/kbm.rsline 323 (outdated):This and the
Mouseinitializers at lines 451 and 635 omit the requiredlast_absfield. There is also an extra closing brace at line 618 that closesmod testsbefore the existing focus-loss test, leaving the file unbalanced. The PR therefore does not compile. Please initializelast_absin everyMouseliteral and remove the extra brace. AI-assisted review: I checked the struct definition, all three initializers, and the surrounding module braces.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.