mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #647] [MERGED] rdna2spirv: accept vcc (s[106:107]) as 64-bit base pointer in s_load_dword* (SHADER-SLOAD-VCC-BASE) #687
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#687
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/647
Author: @TanmaySatyam
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:feat/sload-vcc-base📝 Commits (1)
a4c00f4rdna2spirv: accept vcc (s[106:107]) as 64-bit base pointer in s_load_dword*📊 Changes
3 files changed (+175 additions, -1 deletions)
View changed files
📝
docs/design.md(+1 -0)➕
tests/semantic/test_sload_vcc_base.py(+171 -0)📝
tools/rdna2spirv.py(+3 -1)📄 Description
Claimed in the coordination issue as: SHADER-SLOAD-VCC-BASE
AI-assisted.
What and why
In RDNA2 SMEM
s_load_dword*,SBASEencodes a 2-SGPR-aligned 64-bit pointer (sbase * 2). WhenVCCis dead, the compiler allocatessbase = 53(s[106:107]=vcc, i.e.{vcc_lo, vcc_hi}), emitting instructions such ass_load_dwordx4 s[12:15], vcc, 0x0.Gen.scalar_loadintools/rdna2spirv.pypreviously accepted onlysgprandslistbase operands, raisingUnsupported: s_load_dwordx4 operands sgpr vcc(ands_load_dwordx8 operands sgpr vcc,s_load_dwordx4 operands slist vcc) on 79 pipeline-library compute shaders.base["k"] == "special" and base["t"] == "vcc"as["vcc_lo", "vcc_hi"]inGen.scalar_load(load_slotalready loads%vcc/%vcc_hi).s_buffer_load*still requires a 4-dword V# (len(base_slots) != 4) and continues to reject 2-dwordvcc.OLD-10062, which recoversSGPR > 105tuple encodings): together with #596 / high-SGPR tuple decoding, this brings the 2,684-shader pipeline library compute corpus to 2,684 / 2,684 (100.0%) translated andspirv-val-valid under--wave64-emulate.Testing & Verification
python -m unittest discover -s tests/semantic -p test_sload_vcc_base.py -v(3/3 OK, includingspirv-as+spirv-valvalidation)python -m unittest discover -s tests/semantic -p test_scalar_mem_smem.py(44/44 OK)python -I tests/test_text_write_line_endings.py(3/3 OK)--wave64-emulate+spirv-val): all 79 / 79 previously failingvcc-base library compute shaders (72s_load_dwordx4 sgpr, vcc, 6s_load_dwordx8 sgpr, vcc, 1s_load_dwordx4 slist, vcc) now translate and passspirv-val(bringing library CS from 2,605 → 2,684 / 2,684).python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_sload_vcc_base.py docs/design.mdexited 0.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.