[PR #521] rdna2spirv: route ds_add_f32, ds_cmpst_f32, and ds_*_addtid_b32 through lds_access bounds check #569

Open
opened 2026-11-26 20:18:19 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/521
Author: @tahffo68hk-hash
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/shader-lds-bound-access


📝 Commits (2)

  • b5ae35a rdna2spirv: route ds_add_f32, ds_cmpst_f32, and ds_*_addtid_b32 through lds_access bounds check
  • 2055401 test_lds_bound_access: parse SPIR-V body before check_structure and match %c180/%c17f

📊 Changes

2 files changed (+166 additions, -29 deletions)

View changed files

➕ tests/semantic/test_lds_bound_access.py (+130 -0)
📝 tools/rdna2spirv.py (+36 -29)

📄 Description

Summary

(AI-assisted) Fixes SHADER-LDS-BOUND-ACCESS: in ools/rdna2spirv.py, three LDS handlers still called self.lds_ptr() directly instead of routing through self.lds_load() / self.lds_store() / self.lds_access():

  • ds_read_addtid_b32 / ds_write_addtid_b32
  • ds_add_f32 / ds_add_rtn_f32
  • ds_cmpst_f32 / ds_cmpst_rtn_f32

When self.lds_bound is active (SHADER-309: a compute shader's LDS array is sized to its RSRC2 LDS_SIZE allocation rather than a power-of-two wrapped buffer):

  1. Out-of-bounds accesses silently wrapped and corrupted live LDS instead of dropping writes and returning

🔄 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/521 **Author:** [@tahffo68hk-hash](https://github.com/tahffo68hk-hash) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/shader-lds-bound-access` --- ### 📝 Commits (2) - [`b5ae35a`](https://github.com/ubiquitarianism/leonida/commit/b5ae35a0a27afd69079b7ae40a073de2478c78bc) rdna2spirv: route ds_add_f32, ds_cmpst_f32, and ds_*_addtid_b32 through lds_access bounds check - [`2055401`](https://github.com/ubiquitarianism/leonida/commit/2055401769bf8d850d1d79b7995cd276f14339b9) test_lds_bound_access: parse SPIR-V body before check_structure and match %c180/%c17f ### 📊 Changes **2 files changed** (+166 additions, -29 deletions) <details> <summary>View changed files</summary> ➕ `tests/semantic/test_lds_bound_access.py` (+130 -0) 📝 `tools/rdna2spirv.py` (+36 -29) </details> ### 📄 Description ### Summary (AI-assisted) Fixes SHADER-LDS-BOUND-ACCESS: in ools/rdna2spirv.py, three LDS handlers still called self.lds_ptr() directly instead of routing through self.lds_load() / self.lds_store() / self.lds_access(): - ds_read_addtid_b32 / ds_write_addtid_b32 - ds_add_f32 / ds_add_rtn_f32 - ds_cmpst_f32 / ds_cmpst_rtn_f32 When self.lds_bound is active (SHADER-309: a compute shader's LDS array is sized to its RSRC2 LDS_SIZE allocation rather than a power-of-two wrapped buffer): 1. **Out-of-bounds accesses silently wrapped and corrupted live LDS** instead of dropping writes and returning --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#569
No description provided.