Recompiler: reject image_gather4h/8h instead of translating as 2x2 Gather #437
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!437
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/437/head"
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?
@sennecools on GitHub · 2026-11-24 00:16 UTC · original
sennecools:recomp-mimg-gather4h→main· +17 −0 · 2 files · 1 commits · merged 2026-11-25 01:06 UTCimage_gather4h,image_gather4h_pckandimage_gather8h_pckfetch a horizontal row of texels.mimg()matched them by thegather4prefix, ignored the leftoverh/h_pckas modifiers and emitted a 2x2Gather, which reads the wrong texels. They are now reported as unsupported (image_gather4h) until the row's position and rounding are measured on hardware. Plaingather4*is unchanged.What is in it
crates/xcl/src/gpu/recomp/emit.rs: an earlyErr("image_gather4h")inmimg()forgather4h*/gather8h*crates/xcl/src/gpu/recomp/tests.rs:image_gather4h_is_unsupportedchecks that all three opcodes leave the translation incomplete, with that reasonTested
cargo test --workspace -- --test-threads=4: 667 passed, 0 failed, 41 ignored; noSKIPPEDtestsemit.rschange reverted,image_gather4h_is_unsupportedfails (0 passed, 1 failed)xcl shaders, 26,503 shaders, 44.4 M instructions) uses none of the three opcodes, so this title never reaches the change.Regression run
The retail title, 120 s, offline. The
gpu:line shows a virtual display adapter thatsmoke.ps1picked up. The GPU is the RX 9070 XT above; which adapter XCL used was not checked.main:
this PR:
That is 94.5 % of main's frames. An earlier main run on the same commit showed 2571 frames.
Not tested
AI use
@mastrr9 on GitHub · 2026-11-24 00:30 UTC · original
Code audit + NVIDIA RTX 5080 test run on
1130bc55d1abe860139315ce43630486f8e2affd:Review
Looks clean:
base.starts_with("gather4h") || base.starts_with("gather8h")right beforebase.starts_with("gather4")(emit.rs:2007) cleanly stops horizontal row gathers (IMAGE_GATHER4H,IMAGE_GATHER4H_PCK,IMAGE_GATHER8H_PCK) from silently miscompiling as 2x2Gather, and records them underimage_gather4h.Tested
rustc 1.100.0(MSVC), debug build.cargo build --workspace && cargo test --workspace -- --test-threads=4: 667 passed, 0 failed, 41 ignored.gpu::recomp::tests::image_gather4h_is_unsupported: passed.SKIPPEDGPU tests (2, wave32-only adapter):gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64.Not tested
scripts/smoke.ps1run (test suite only).AI use: code review and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above.
@AC-Storm-YT on GitHub · 2026-11-24 00:35 UTC · original
Test run on AMD RDNA4 – commit
1130bc5(this PR's head, as is), clean treeTested
backend 'real' – AMD Radeon RX 9070 XT); AMD Ryzen 7 9800X3D; Windows 11 Pro build 26200; Rust 1.100.0stable-x86_64-pc-windows-msvc, debug; DXC 1.8.2502.11cargo build --workspace: okcargo test --workspace -- --test-threads=4: 667 passed, 0 failed, 41 ignored. No SKIPPED tests.image_gather4h_is_unsupportedNot tested
smoke.ps1runmainRun and report: Claude Code (Claude Opus 5.5).
@TheHoracio on GitHub · 2026-11-24 00:36 UTC · original
Test report on AMD RDNA3: RX 7800 XT (16 GB), driver 32.0.32015.7029, Ryzen 7 9800X3D, Windows 11 Pro 10.0.26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug build. No retail data was used.
Tested: the PR head
1130bc5as it is (on its basedb1ddb2, not merged onto current main).cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 667 passed, 0 failed, 41 ignored, no SKIPPED tests.image_gather4h_is_unsupportedpasses.Not tested: a regression run on a title, a release build, and the head merged onto current
main.AI use: Claude Code ran the commands and drafted this comment; the runs are real runs on the hardware above.
@4usphs on GitHub · 2026-11-24 00:38 UTC · original
Test run of this PR merged onto current
maina6f5f7a(local merge, no conflicts):cargo test --workspace -- --test-threads=4gives 677 passed, 0 failed, 41 ignored, 0SKIPPED(676 onmainplus the new test). The PR's head1130bc5on its own: 667 / 0 / 41.RX 9070 XT (driver 32.0.32029.2010), Ryzen 7 9800X3D, Windows 11 Pro 26200, Rust 1.100.0, debug build. This is the same hardware as the PR's own run.
On which opcodes were miscompiled before (the description and the review above say all three): a note from the tool, which I could not review myself. With
emit.rsset back tomain,gather4handgather4h_pcktranslate without a reject.gather8h_pckwas already refused (image_gather8h_pck: MIMG), because it does not start withgather4. So for that opcode the PR only changes the reason. The change itself is fine either way.Not tested: smoke or a retail title, a release build, other GPUs.
AI use: Claude Code (Claude Opus 5.5) ran the tests on my PC and wrote this comment. I have not reviewed the code.