Direct DXIL: scratch address calculation ignores SVE and treats SADDR and ADDR as mutually exclusive #2390
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from ivall/xcl. Originally posted by ahmetbagci8 on 2026-11-25T17:48:30Z.
Summary
In
crates/xcl/src/gpu/dxil/lower_mem.rs(scratch, lines 2354-2359):In RDNA2
ENC_FLAT_SCRATCH,SVE(Scratch VGPR Enable) independently controls whetherVADDR(ADDR) is included in the address, andSADDR != 0x7Findependently controls whetherSGPR[SADDR]is included. Treating them as mutually exclusive without checkingSVEcauses two bugs:SADDR != 0x7FandSVE == 1(indexed scratch access with a base SGPR + per-lane VGPR offset),vreg(ADDR)is completely dropped.SADDR == 0x7FandSVE == 0(immediate-only scratch offset),vreg(ADDR)is erroneously used as the base instead of0.Suggested fix
Not tested
082944135cd2b96288470a595861fa608eee08dcwithout a new runtime test.AI use
lower_mem.rsand drafted this report; the author reviewed it before posting.Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T20:49:08Z.
Claiming this issue: fixing RDNA2 Direct DXIL scratch() address calculation to handle SVE and combined SADDR + ADDR, with regression tests.
AI use: Claude Code (Claude Opus 5.5).