rdna2spirv: v_writelane_b32 reads its destination (SHADER-768) #175

Closed
Andretuta wants to merge 4 commits from upstream-pr/175 into main
Andretuta commented 2026-11-24 02:35:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:35:34Z.


Carried over from old PR 9910 by LouisRiverstone in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9910, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
LouisRiverstone: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

SHADER-768, from the "Up for grabs" table in #4257: read_before_write_vgprs counted v_writelane_b32 as a full write of its destination.

v_writelane_b32 vD, sSRC, sLANE writes one lane of vD and keeps every other lane's value. The translator's own emission loads the old vD and selects per lane. So the value vD held before is read, and a shader whose first touch of a VGPR is a writelane should report that VGPR as read before written.

Re-submission of #4297. #4297 was closed unmerged during the 2026-11-23 22:45 UTC cleanup, along with the other open PRs. This is the same branch, now merged with current main.

Checked on #4297 by: theswiss24 (RTX 4070), JRamos1993 (RTX 5090), kapitche (Linux), javdc (Steam Deck LCD), mrloic (RTX 4060), wavehs (Apple M3 Pro), TG0000 (RX 6800), matheusfermiano-source (main 867d922f0)).

No game files.

AI-assisted (Claude Code): I reviewed the change and re-ran its tests on the merge with main.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465015003 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/175). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:35:34Z. --- > Carried over from **old PR 9910** by `LouisRiverstone` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9910`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `LouisRiverstone`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): SHADER-768, from the "Up for grabs" table in `#4257`: `read_before_write_vgprs` counted `v_writelane_b32` as a full write of its destination. `v_writelane_b32 vD, sSRC, sLANE` writes one lane of `vD` and keeps every other lane's value. The translator's own emission loads the old `vD` and selects per lane. So the value `vD` held before is read, and a shader whose first touch of a VGPR is a writelane should report that VGPR as read before written. Re-submission of `#4297`. `#4297` was closed unmerged during the 2026-11-23 22:45 UTC cleanup, along with the other open PRs. This is the same branch, now merged with current `main`. Checked on `#4297` by: theswiss24 (RTX 4070), JRamos1993 (RTX 5090), kapitche (Linux), javdc (Steam Deck LCD), mrloic (RTX 4060), wavehs (Apple M3 Pro), TG0000 (RX 6800), matheusfermiano-source (main 867d922f0)). No game files. AI-assisted (Claude Code): I reviewed the change and re-ran its tests on the merge with `main`.
LouisRiverstone commented 2026-11-24 11:10:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by LouisRiverstone on 2026-11-24T11:10:10Z.


Taken over by its author in #658 (rebased on main). This draft can be closed.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7129746430 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/175#issuecomment-7129746430). Originally posted by [LouisRiverstone](https://github.com/LouisRiverstone) on 2026-11-24T11:10:10Z. --- Taken over by its author in #658 (rebased on main). This draft can be closed.
ubiquitarianism commented 2026-11-24 16:17:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ubiquitarianism on 2026-11-24T16:17:50Z.


Closing: replaced by #658, which is merged.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7137432670 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/175#issuecomment-7137432670). Originally posted by [ubiquitarianism](https://github.com/ubiquitarianism) on 2026-11-24T16:17:50Z. --- Closing: replaced by #658, which is merged.

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
ProjectLeonida/mandy!175
No description provided.