Repository navigation
Recompiler: keep far jumps indirect when entered after s_getpc_b64 (#863) - #942
Youssefrah16 wants to merge 1 commit into
Conversation
|
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean One more passing test than main: keeping entered far jumps indirect after Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it. |
|
Hardware check of Tested
Regression run PR ( Not tested
AI use
|
|
Linux / AMD RDNA3 datapoint. Merged state: head Full suite, Not tested: retail titles (none here), Windows, RDNA4. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting. |
|
Test report: NVIDIA RTX 5060 Ti (wave32), head Tested
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the commands above and wrote this report. No code changes. |
|
Independent verification, merged onto current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
|
This and #865 (opened about two hours earlier) fix #863 the same way, so CONTRIBUTING's "one of several PRs for the same problem" applies. I cross-ran their tests to give the maintainer something to choose on. The rule is the same in both. Every candidate far jump is resolved first. All direct branch targets plus all candidate far targets go into one set. A sequence keeps its fixed target only if none of its
Tested (Windows 11 Pro 26100, Rust 1.100.0 MSVC, debug; CPU-only tests)
So each PR passes the other's tests, and the two edit the same lines of AI-assisted (Claude Code). |
|
Two contributors checked independently and found that this PR makes the same change as #865 #1632 (for #863): #1607, group D31. They suggest keeping #865. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps. This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table. |
|
Closing this as a duplicate: #865 makes the same change and was opened first (a far jump entered after its s_getpc_b64 stays indirect). It stays open and is the one that will be reviewed and merged. This says nothing about the quality of the code here. I compared the two diffs; the pair was also found by independent checks in #1607. If this PR covers a case #865 does not, or #865 is closed without being merged, say so and I'll reopen it. A test that is only here is welcome on #865. Thank you for the work. AI use: Claude Code (Claude Opus 5.5) compared the diffs and wrote this comment; the decision is the maintainer's. |
Fixes #863.
What changed
crates/xcl/src/gpu/rdna2.rs(resolve_far_jumps):far_targetbefore scanning sobranch_targetonly inspects direct branches.S_GETPC_B64/S_ADD_U32+S_ADDC_U32orS_SUB_U32+S_SUBB_U32/S_SETPC_B64) first (returning immediately with no allocation when there are none).far_targetonly when none of the sequence's post-S_GETPC_B64instructions (lo,hi,set) is targeted. Entering atS_GETPC_B64itself still resolves as a direct far jump.crates/xcl/src/gpu/recomp/tests.rs(far_jumps_stay_indirect_when_entered_after_getpc):get,lo,hi, andsetfor both add and subtract forms, verifyingfar_targetand thattranslatekeepss_setpc_b64indirect whens_getpc_b64is bypassed.get,lo,hi, andsetof a second far-jump sequence.Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), debug build, no game data:cargo test -p xcl --lib far_jump: 3 passed, 0 failed.cargo test -p xcl --lib gpu:: -- --test-threads=4: 284 passed, 0 failed, 18 ignored (SKIPPED: no wave64on 2 tests).XCL_ADAPTER=radeon):cargo test -p xcl --lib far_jump: 3 passed, 0 failed.cargo test -p xcl --lib gpu:: -- --test-threads=4: 284 passed, 0 failed, 18 ignored (SKIPPED: no mesh shaderson 2 tests).cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored) and @eizispark (RX 9070 XT).Regression run
scripts/smoke.ps1, 60 s. The blocks are copied unchanged from that comment.main(beaa245):PR (
a527eb3):Not tested
AI use