[PR #412] [MERGED] test(shader): order shared memory in the subdword LDS fixture (SHADER-LDS-SUBDWORD-FIXTURE) #463

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/412
Author: @BadgersMC
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: fix/lds-subdword-fixture


📝 Commits (1)

  • eaa2859 test(shader): order shared memory in the subdword LDS fixture

📊 Changes

2 files changed (+8 additions, -3 deletions)

View changed files

📝 runtime/test/shaders/cs_w32_lds_subdword.asm (+5 -2)
📝 tests/semantic/fixtures/disasm/cs_w32_lds_subdword.s (+3 -1)

📄 Description

Claimed in the coordination issue as: SHADER-LDS-SUBDWORD-FIXTURE (claim).

What and why

Every lane in cs_w32_lds_subdword wrote the same two LDS words. The output matched, but GPU-assisted validation reported six shared-memory errors. Moving the existing EXEC mask before the first LDS access gives lane zero exclusive access. A workgroup barrier after each write phase orders the initial 32-bit stores, narrow writes, and reads. The checked-in disassembly mirrors the fixture and all eight expected words remain the same.

Tested

  • On main at d2cd6c0d, the original fixture failed with six GPU-assisted validation errors while returning the expected words. The patched fixture passed with the same eight words and no validation errors. It also passed on #382 at 5cb32c2b.

  • All four test_lds_subdword_wide.py tests passed, including the negative controls. The fixture source and checked-in disassembly match instruction for instruction.

  • The GPU runner used the checked-in disassembly and SPIRV-Tools v2026.4 build 4a21a48a with LEONIDA_VK_VALIDATION=1, VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1, and LEONIDA_W64_EMULATE=1. Both revisions assembled with spirv-as and passed spirv-val.

  • The 6,103-test semantic suite completed over 465 files. Two files initially failed because spirv-as and spirv-val were missing. Both passed when rerun with those tools available (test_sopc_validation: 11 tests, test_unary_f16_validation: 5 tests).

  • Rechecked after applying the patch cleanly to main at 21625bca. Both versions pass spirv-val. GPU-assisted validation goes from six errors to zero, with the same eight words. All 377 LDS-related semantic tests passed.

GPUs tested: NVIDIA RTX 3060 Ti, driver 610.88, Windows 11, Khronos validation layer 1.4.369.

AI-assisted: yes.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • Synthetic test fixture only. No game data, keys or decryption.
  • Translator rule and contract table: not applicable to this fixture-only change.

🔄 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/412 **Author:** [@BadgersMC](https://github.com/BadgersMC) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `fix/lds-subdword-fixture` --- ### 📝 Commits (1) - [`eaa2859`](https://github.com/ubiquitarianism/leonida/commit/eaa28590766423a549dd7ca5bc8e8276de8519fd) test(shader): order shared memory in the subdword LDS fixture ### 📊 Changes **2 files changed** (+8 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/shaders/cs_w32_lds_subdword.asm` (+5 -2) 📝 `tests/semantic/fixtures/disasm/cs_w32_lds_subdword.s` (+3 -1) </details> ### 📄 Description Claimed in the coordination issue as: `SHADER-LDS-SUBDWORD-FIXTURE` ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7122094161)). ### What and why Every lane in `cs_w32_lds_subdword` wrote the same two LDS words. The output matched, but GPU-assisted validation reported six shared-memory errors. Moving the existing EXEC mask before the first LDS access gives lane zero exclusive access. A workgroup barrier after each write phase orders the initial 32-bit stores, narrow writes, and reads. The checked-in disassembly mirrors the fixture and all eight expected words remain the same. ### Tested - On `main` at `d2cd6c0d`, the original fixture failed with six GPU-assisted validation errors while returning the expected words. The patched fixture passed with the same eight words and no validation errors. It also passed on #382 at `5cb32c2b`. - All four `test_lds_subdword_wide.py` tests passed, including the negative controls. The fixture source and checked-in disassembly match instruction for instruction. - The GPU runner used the checked-in disassembly and SPIRV-Tools v2026.4 build `4a21a48a` with `LEONIDA_VK_VALIDATION=1`, `VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1`, and `LEONIDA_W64_EMULATE=1`. Both revisions assembled with `spirv-as` and passed `spirv-val`. - The 6,103-test semantic suite completed over 465 files. Two files initially failed because `spirv-as` and `spirv-val` were missing. Both passed when rerun with those tools available (`test_sopc_validation`: 11 tests, `test_unary_f16_validation`: 5 tests). - Rechecked after applying the patch cleanly to `main` at `21625bca`. Both versions pass `spirv-val`. GPU-assisted validation goes from six errors to zero, with the same eight words. All 377 LDS-related semantic tests passed. GPUs tested: NVIDIA RTX 3060 Ti, driver 610.88, Windows 11, Khronos validation layer 1.4.369. AI-assisted: yes. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] Synthetic test fixture only. No game data, keys or decryption. - Translator rule and contract table: not applicable to this fixture-only change. --- <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:58 +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#463
No description provided.