[PR #175] [CLOSED] rdna2spirv: v_writelane_b32 reads its destination (SHADER-768) #226

Closed
opened 2026-11-26 20:17:12 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/175
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: old-pr/9910


📝 Commits (4)

  • d73fabd read_before_write_vgprs: v_writelane_b32 keeps its destination's other lanes (SHADER-768)
  • 7b3145e Merge remote-tracking branch 'origin/main' into HEAD
  • be4ce32 Merge remote-tracking branch 'origin/main' into HEAD
  • 0704e43 Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

2 files changed (+112 additions, -12 deletions)

View changed files

➕ tests/semantic/test_writelane_read_before_write.py (+82 -0)
📝 tools/rdna2spirv.py (+30 -12)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/175 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `old-pr/9910` --- ### 📝 Commits (4) - [`d73fabd`](https://github.com/ubiquitarianism/leonida/commit/d73fabdf361ed863106da6f74d468cddb96b5729) read_before_write_vgprs: v_writelane_b32 keeps its destination's other lanes (SHADER-768) - [`7b3145e`](https://github.com/ubiquitarianism/leonida/commit/7b3145ef252d789dab82acc198edd7abd80386b0) Merge remote-tracking branch 'origin/main' into HEAD - [`be4ce32`](https://github.com/ubiquitarianism/leonida/commit/be4ce32e002a65af628f28ca67023f6435c3b392) Merge remote-tracking branch 'origin/main' into HEAD - [`0704e43`](https://github.com/ubiquitarianism/leonida/commit/0704e43a0b11f1baedd6108dd180d97c2efd9e56) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **2 files changed** (+112 additions, -12 deletions) <details> <summary>View changed files</summary> ➕ `tests/semantic/test_writelane_read_before_write.py` (+82 -0) 📝 `tools/rdna2spirv.py` (+30 -12) </details> ### 📄 Description > 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`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:12 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#226
No description provided.