Shaders: read EXEC as data in the entry block #3940
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3940"
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 Marvisak/VIctory. Originally posted by kotekompotek on 2026-12-01T18:24:08Z.
Summary
Programs that read the EXEC registers (SGPRs 126/127 in the flattened numbering) as data in their entry block were refused with "a hardware SGPR input". The execution mask on entry is provable: every lane the wave launched with is on.
This emits the concrete lane mask instead of refusing:
u32::MAXfor the low dword,u32::MAXfor the high dword on wave64 and0on wave32 (which has no EXEC high half). The mask machinery'sMissing("a lane mask")path stays for phi joins, where EXEC is genuinely varying.Evidence
A corpus scan of the title's shader archive (26 503 containers,
translate --listwith word-level tracing) counted ~30 000 entry-block EXEC reads across pixel (initialized_sgprs=19) and compute (9, 14) programs — the largest single refusal class observed after the FSPX root-type fix. Program inputs forReg::S(EXEC)are already markedBool::TRUEinstructure.rs's mask tracking.Test plan
cargo check -p victory-shadercleanGenerated with Devin.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.