Recompiler: track four image resource SGPRs with R128 set #2000
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!2000
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2000"
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?
@MiguelMachado-dev on GitHub · 2026-11-25 00:35 UTC · original
MiguelMachado-dev:sgpr-fix→main· +64 −3 · 4 files · 1 commits · openPart of #1269. With
R128=1,MIMG.SRSRCnames four SGPRs. Counting eight made the per-lane backend refuseIMAGE_LOADwhen the next SGPR held a lane mask.What is in it
rdna2::sgpr_usesandx64_masks::uses. WithR128=0, use the table width, including the four-SGPR BVH entries.IMAGE_LOADwave32 case throughlower_dxil::compute_code. The shader is accepted withR128=1. WithR128=0,s8is part of the descriptor and the mask read is refused.Tested
263a5e0, Windows 11 build 26300.9974, i7-14700KF, RTX 5080 (driver 621.24), Rust 1.97.1 and DXC 1.8.2502.11. Cargo tests ran in debug.cargo test -p xcl --lib mimg_r128 -- --test-threads=4reported 2 passed, 0 failed, 0 ignored and 0SKIPPED. Both regressions failed before the fix.cargo build --workspacepassed.cargo test --workspace --no-fail-fast -- --test-threads=4reported 993 passed, 4 failed and 45 ignored. The fourfuzz_validate_and_gpu_*tests also failed on cleanmainat8c4a46awith0x8007000EinCreateComputePipelineStateat the same seeds (70, 545, 1019 and 1507).SKIPPEDreports. 19 had no wave64, 3 were f16 lowering refusals, 1 could not disable the driver cache, and 1 had no heap windows.Regression run
scripts/smoke.ps1ran release builds on the same title for 60 seconds with the default backend.Not tested
XCL_SAMPLE_*fixtures.AI use
@raylitebull on GitHub · 2026-11-25 01:34 UTC · original
Diff audit passed (
rdna2::sgpr_operand_dwordscheckingMIMGR128 == 1-> 4 SGPRs shared acrossrdna2::sgpr_usesandx64_masks::uses, plusmimg_r128_leaves_the_mask_outside_the_descriptor).Build and test (Windows, no GPU)andPR descriptionare both green on263a5e0, and RTX 5080 passed.Remaining before merge: one independent AMD GPU verification pass on
263a5e0.@JJAutoCompare on GitHub · 2026-11-25 03:21 UTC · original
Tested
PR #2000 at
263a5e011d80270ebc8a3617badedc09d0a1e2bd, in a clean detached checkout. STOR-WINLAB ran Windows 11 Enterprise Evaluation 26200.9974 on a Ryzen 7 3800X, with an Intel Arc A770 (driver 32.0.101.9175) installed. The CPU-only run used Rust and Cargo 1.100.0 (x86_64-pc-windows-msvc), the unoptimized test profile, and DXC/DXIL 1.9.2609.5 for DXIL validation.cargo test -p xcl --locked --lib mimg_r128 -- --nocapture --test-threads=1selected exactly two tests. Both passed, with 0 failed, 0 ignored, 0 explicit skips, and 971 filtered out. The harness reported 0.02 seconds.gpu::recomp::x64_masks::tests::mimg_r128_descriptor_readschecked both SGPR trackers. ForIMAGE_LOAD, they tracked reads ofs4–s7withR128=1ands4–s11withR128=0. Both BVH opcodes retained four SGPR reads withR128=0. All four cases had zero SGPR writes.gpu::recomp::lower_dxil::tests::mimg_r128_leaves_the_mask_outside_the_descriptorchecked per-lane wave32IMAGE_LOADtranslation throughcompute_code. WithR128=1, the fixture kept the lane mask ins8outside the descriptor and produced DXIL that passed validation. WithR128=0, it returned the expected refusal for reading that mask as a number.Not tested
GPU execution on any adapter, fuzzing, retail titles, and the full workspace suite.
AI use
T3 Code / Codex gpt-6.2-sol verified the checkout, ran the two checked-in fixtures, and wrote this report.
@DavidM1911 on GitHub · 2026-11-25 03:43 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 3 real failures, deterministic (also fail--test-threads=1, 1038/3):Looks like the R128/mask handling for IMAGE_LOAD regressed (the mask is being folded into the descriptor operand instead of staying outside it). Needs a fix before merge.
— Devin
@thehollowedone on GitHub · 2026-11-25 14:02 UTC · original
Independent integration recheck of 263a5e0 on main 06c9f55. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11.
The clean local merge reproduced all three failures from DavidM1911’s run. The two register-use trackers disagreed for
IMAGE_LOAD R128=1, and the per-lane translator rejected the read ofs8.For a local control, I made the precomputed operand plan use the same R128 descriptor-width rule as the fallback tracker. With that change, the same three tests passed, including the stock comparison across all RDNA2 instructions. The offline workspace build passed, and the patched workspace suite finished with 1,267 passed, 0 failed, 46 ignored, including 26 runtime skips in the pass count.
Focused command:
cargo test --offline --locked -p xcl --lib -j 6 -- --test-threads=1 --nocapture mimg_r128 use_plan_matches_fallback_across_all_rdna2_instructions. Workspace command:cargo test --offline --locked --workspace --no-fail-fast -j 6 -- --test-threads=4 --nocapture.Synthetic tests only. The patched result is local. AMD GPU verification remains open.
AI-assisted. Codex (GPT-6, exact variant unavailable) ran the reproduction, wrote the local control, and drafted this report.
github-bot referenced this pull request2026-11-26 06:18:31 +00:00
@ClosetPie107 on GitHub · 2026-11-26 06:49 UTC · original
Tested head
263a5e01merged onto currentmain(b49be183) on AMD RDNA4 / Linux (Proton Experimental): 3 unit tests fail after merging withmain.Hardware & environment
experimental-11.0-20261112), DXC1.9.2609.5, Rustx86_64-pc-windows-gnu(debug)Targeted unit tests (
mainb49be183+ #2000263a5e01,--test-threads=1):xcl.exe gpu::rdna2:: -- --test-threads=1: 18 passed, 0 failed, 0 ignored (0 skipped).xcl.exe gpu::recomp::x64_masks:: -- --test-threads=1: 18 passed, 2 failed, 1 ignored (mimg_r128_descriptor_readsanduse_plan_matches_fallback_across_all_rdna2_instructions).xcl.exe r128 -- --test-threads=1: 0 passed, 2 failed, 0 ignored:gpu::recomp::x64_masks::tests::mimg_r128_descriptor_reads(x64_masks.rs:794):assertion left == right failed: IMAGE_LOAD R128=1: left: [4, 5, 6, 7, 8, 9, 10, 11], right: [4, 5, 6, 7]gpu::recomp::lower_dxil::tests::mimg_r128_leaves_the_mask_outside_the_descriptor(lower_dxil.rs:482):called Result::unwrap() on an Err value: "unsupported IMAGE_LOAD (s8: a mask read as a number)"Looks like #2000 needs a rebase onto current
main(it auto-merged without git conflicts, but theR128descriptor width isn't taking effect againstmain's currentrdna2.rs/x64_masks.rs).Not tested
263a5e01on its original base without mergingmain, or retail title run (excluded due to the unit test failures).AI use
main, ran the Proton unit tests on this machine, and drafted this report.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.