Recompiler: write all bytes of unaligned multi-dword formatted buffer stores #312
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!312
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-312"
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?
@Michael-Glaser on GitHub · 2026-11-23 23:07 UTC · original
Michael-Glaser:fix/recomp-st-bytes-unaligned→main· +60 −3 · 2 files · 1 commits · openst_bytesinPRELUDE_MEMonly wroter.xon its unaligned / non-multiple-of-4 fallback path, dropping bytes 4..15 of 8-, 12-, and 16-byte formatted buffer stores.What is in it
crates/xcl/src/gpu/recomp/emit.rs: loop over all 4 dwords ofrinst_bytes's fallback path.crates/xcl/src/gpu/recomp/tests.rs: HLSL emission test + GPU test for 8-, 12-, and 16-byte unaligned formatted stores.Tested
aarch64-apple-darwin, Rust 1.100.0):cargo check --offline --target x86_64-pc-windows-msvc --workspace --tests(0 errors, 0 new warnings).Not tested
cargo test, GPU tests (AMD/NVIDIA), andscripts/smoke.ps1not run yet.AI use
@regiumlepidi on GitHub · 2026-11-23 23:45 UTC · original
A Windows run for this draft, since the description has none yet:
d9d6fe0merged onto currentmaindb1ddb2(clean merge): builds and passes on NVIDIA and AMD, and the new tests catch the bug.Tested
XCL_ADAPTER=radeon.\scripts\test.ps1(cargo test --workspace -- --test-threads=4), noXCL_SAMPLE_*setmaindb1ddb2d9d6fe0ondb1ddb2GPU tests skipped: the usual 2 (
no wave64) on NVIDIA, none on the iGPU.The two new tests with this PR's
tests.rsbutmain'semit.rs: both fail on both adapters, e.g.gpu_unaligned_multi_dword_format_stores:store of 8 bytes at 0x100+1,left: [170, 68, 51, 34, 17, 170, 170, …],right: [170, 68, 51, 34, 17, 136, 119, 102, 85, 170, …](the second dword never written). With this PR'semit.rsboth pass on both adapters.Not tested
scripts/smoke.ps1on a real title (I have none).AI use: Claude Code with Claude Opus 5.5 ran the build and tests and wrote this comment; the numbers come from those runs.
@ghost on GitHub · 2026-11-23 23:48 UTC · original
Tested
d9d6fe0merged ontomaindb1ddb2(clean merge) on AMD RDNA4: pass, and both new tests fail without theemit.rschange. This covers the Windows build and GPU run listed under "Not tested".Tested
.\scripts\test.ps1: 668 passed, 0 failed, 41 ignored; noSKIPPEDGPU tests on this adapter.XCL_REQUIRE_GPU=wave64,mesh cargo test -p xcl --lib unaligned:st_bytes_writes_every_dword_of_unaligned_storesandgpu_unaligned_multi_dword_format_storespass.emit.rsput back tomain. Both tests fail. The GPU one fails at its first case,store of 8 bytes at 0x100+1: bytes 1..4 holdr.xand bytes 5..8 stay0xAA(expected88 77 66 55). (The PR's owntests.rs, from its base4017f8f, doesn't compile on currentmain, so the control uses the merged tree.)Not tested
XCL_SAMPLE_*set and no retail title, so nosmoke.ps1regression run; NVIDIA.AI use
@CuteBooty on GitHub · 2026-11-24 21:02 UTC · original
Regression run on a retail title for
b8424b2: pass (no device removal, no crash, frames and peak commit within the check's limits).Tested
scripts\smoke.ps1 -Game <folder> -Seconds 60, no input, on this PR's head as it is and onmain47efa2e, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. Themainblock is shared with my reports on other PRs of the same base.main:
this PR:
Not tested
mainmerged in, AMD and Intel GPUs.AI use
@DavidM1911 on GitHub · 2026-11-25 14:43 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
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.