Preserve VGPR slots observed by relative reads #121

Closed
Kamiloj9 wants to merge 1 commit from upstream-pr/121 into main
Kamiloj9 commented 2026-11-24 21:39:07 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Kamiloj9 on 2026-11-24T21:39:07Z.


Summary

  • Follow up on #11 by keeping fixed-lane saves physical when they can reach an M0-relative VGPR read.
  • Restore independent scalar spill slots when control flow proves that their saves cannot reach a relative reader and that every restore has a prior save. Keep both halves of a parked Wave64 mask together.
  • Lower a constant-index relative read using only its selected VGPR. Unknown indices retain the full possible source range.

Verification

  • All 57 targeted IR, resource and structure tests passed on the PR base, along with shader Clippy, the diagnostic build and the asset-policy check.
  • Two locally captured shader repros validate with a Wave32 host cap. The previously blocked compute repro emits WaveSize=32 both with default settings and with shader optimization disabled and strict joins enabled.
  • An integrated RTX 4080 SUPER replay created the compute PSO and recorded its indirect dispatches in completed submissions. The trace did not inspect the indirect group counts.
<!-- greyfinch-sync:fxceless/victory-fork:issue:6591939035 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/121). Originally posted by [Kamiloj9](https://github.com/Kamiloj9) on 2026-11-24T21:39:07Z. --- ## Summary - Follow up on #11 by keeping fixed-lane saves physical when they can reach an M0-relative VGPR read. - Restore independent scalar spill slots when control flow proves that their saves cannot reach a relative reader and that every restore has a prior save. Keep both halves of a parked Wave64 mask together. - Lower a constant-index relative read using only its selected VGPR. Unknown indices retain the full possible source range. ## Verification - All 57 targeted IR, resource and structure tests passed on the PR base, along with shader Clippy, the diagnostic build and the asset-policy check. - Two locally captured shader repros validate with a Wave32 host cap. The previously blocked compute repro emits `WaveSize=32` both with default settings and with shader optimization disabled and strict joins enabled. - An integrated RTX 4080 SUPER replay created the compute PSO and recorded its indirect dispatches in completed submissions. The trace did not inspect the indirect group counts.
arminkhaleghirod commented 2026-11-24 23:09:35 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by arminkhaleghirod on 2026-11-24T22:23:53Z.


Merged onto main 90228a7 and ran victory translate --validate over the full title (26,148 programs) on Windows 11 / RTX 4080.

No change: every failure count matches main, and no new reason appears. What it changes at run time isn't covered by this check.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7146178946 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/121#issuecomment-7146178946). Originally posted by [arminkhaleghirod](https://github.com/arminkhaleghirod) on 2026-11-24T22:23:53Z. --- Merged onto main 90228a7 and ran `victory translate --validate` over the full title (26,148 programs) on Windows 11 / RTX 4080. No change: every failure count matches main, and no new reason appears. What it changes at run time isn't covered by this check.
upstream-sync closed this pull request 2026-11-26 01:05:51 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!121
No description provided.