shader: lane_uniform no longer calls lane-dependent results alike #2389

Manually merged
github merged 1 commit from github-bot/gh-2389 into main 2026-11-30 14:15:52 +00:00 AGit
Owner

@⁠FIocker on GitHub · 2026-11-29 12:37 UTC · original
FIocker:contrib/lane-uniform-implicit-reads → main · +10 −1 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC

lane_uniform (emit/lower/analysis.rs) took three kinds of input as one value per wave, which they are not:

  • v_div_fmas reads VCC per lane, and no operand names it.
  • Inline constants 251-254 (EXECZ, VCCZ, SCC, LDS direct) and attribute operands depend on execution or the lane.
  • A MAC's accumulator and v_swap_b32's other side are implicit vector reads outside the source operands; the operand check never looked at them.

A result marked uniform from any of these is wrong in the lanes that differ, for example once it is read with v_readfirstlane or used as a uniform index. After coasting (GPL-3.0).

Checked: workspace check clean; victory-shader lib tests 462 passed (release).

🤖 Generated with Claude Code

**@⁠FIocker** on GitHub · 2026-11-29 12:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2389) `FIocker:contrib/lane-uniform-implicit-reads` → `main` · +10 −1 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC `lane_uniform` (`emit/lower/analysis.rs`) took three kinds of input as one value per wave, which they are not: - `v_div_fmas` reads VCC per lane, and no operand names it. - Inline constants 251-254 (EXECZ, VCCZ, SCC, LDS direct) and attribute operands depend on execution or the lane. - A MAC's accumulator and `v_swap_b32`'s other side are implicit vector reads outside the source operands; the operand check never looked at them. A result marked uniform from any of these is wrong in the lanes that differ, for example once it is read with `v_readfirstlane` or used as a uniform index. After coasting (GPL-3.0). Checked: workspace check clean; `victory-shader` lib tests 462 passed (release). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Three inputs were taken as one value per wave:
- v_div_fmas reads VCC per lane (no operand names it);
- inline constants 251-254 (EXECZ, VCCZ, SCC, LDS direct) and attribute
  operands depend on execution or the lane;
- a MAC's accumulator and v_swap_b32's other side are implicit vector
  reads outside the source operands.
A value marked uniform from those is wrong in lanes that differ. After
coasting (GPL-3.0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 12:38:09 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-29 12:49 UTC · original · approved these changes

Tested locally merged onto main (829188e9).

  • Merge: Clean 11-line merge in crates/victory-shader/src/emit/lower/analysis.rs.
  • Tests (RTX 5090):
    • cargo test -p victory-shader --lib emit::lower::tests:: passed (25 passed; 0 failed; 1 ignored).
    • cargo test -p victory-shader --lib emit::wave64_tests:: passed (44 passed; 0 failed).
  • 0 new warnings.

Important soundness fix in lane_uniform preventing lane-dependent instructions from being treated as uniform. LGTM.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-29 12:49 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2389#pullrequestreview-6102942347) · **approved these changes** Tested locally merged onto `main` (`829188e9`). - **Merge**: Clean 11-line merge in `crates/victory-shader/src/emit/lower/analysis.rs`. - **Tests (RTX 5090)**: - `cargo test -p victory-shader --lib emit::lower::tests::` passed (`25 passed; 0 failed; 1 ignored`). - `cargo test -p victory-shader --lib emit::wave64_tests::` passed (`44 passed; 0 failed`). - 0 new warnings. Important soundness fix in `lane_uniform` preventing lane-dependent instructions from being treated as uniform. LGTM. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
github manually merged commit 91624f21fd into main 2026-11-30 14:15:52 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2389
No description provided.