test(shader): restrict wide LDS fixture to lane zero (TEST-LDS-WIDE-GPUAV) #1309

Merged
BadgersMC merged 1 commit from upstream-pr/1309 into main 2026-11-25 02:36:39 +00:00
BadgersMC commented 2026-11-24 21:40:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BadgersMC on 2026-11-24T21:40:08Z.


Claimed in the coordination issue as TEST-LDS-WIDE-GPUAV.

What and why

The wide LDS fixture let all lanes write the same shared addresses. The output words matched, but Vulkan GPU-assisted validation reported six shared-memory races. Move the existing lane-zero EXEC mask before the first LDS write and mirror the instruction move in the checked-in disassembly. This preserves the eight expected words, including the zero sentinel immediately after the b96 write.

Tested

  • At baseline 5237898a, GPU-assisted validation reported six races with zero output mismatches. The patched fixture passed with zero validation errors and the same eight words. Both translated and passed spirv-val.
  • The handwritten shader rebuilt with LLVM 23.1.5 and produced byte-identical SPIR-V to the checked-in disassembly. The GPU test also passed with wave64 emulation disabled. The GPU-assisted tests used SPIRV-Tools v2026.4 and Khronos validation layer 1.4.369.
  • The full translator regression suite passed all 6,177 tests across 471 files. All four tests in test_lds_subdword_wide.py also passed in the focused run.
  • The no-game-data check and git diff --check passed.

GPUs tested: NVIDIA RTX 3060 Ti, driver 610.88, Windows 11. The test inputs are hand-written fixtures.

AI-assisted: yes.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5480789338 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1309). Originally posted by [BadgersMC](https://github.com/BadgersMC) on 2026-11-24T21:40:08Z. --- Claimed in the coordination issue as [TEST-LDS-WIDE-GPUAV](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133128497). ### What and why The wide LDS fixture let all lanes write the same shared addresses. The output words matched, but Vulkan GPU-assisted validation reported six shared-memory races. Move the existing lane-zero EXEC mask before the first LDS write and mirror the instruction move in the checked-in disassembly. This preserves the eight expected words, including the zero sentinel immediately after the b96 write. ### Tested - At baseline `5237898a`, GPU-assisted validation reported six races with zero output mismatches. The patched fixture passed with zero validation errors and the same eight words. Both translated and passed `spirv-val`. - The handwritten shader rebuilt with LLVM 23.1.5 and produced byte-identical SPIR-V to the checked-in disassembly. The GPU test also passed with wave64 emulation disabled. The GPU-assisted tests used SPIRV-Tools v2026.4 and Khronos validation layer 1.4.369. - The full translator regression suite passed all 6,177 tests across 471 files. All four tests in `test_lds_subdword_wide.py` also passed in the focused run. - The no-game-data check and `git diff --check` passed. GPUs tested: NVIDIA RTX 3060 Ti, driver 610.88, Windows 11. The test inputs are hand-written fixtures. AI-assisted: yes. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption.
moffington commented 2026-11-24 22:04:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by moffington on 2026-11-24T22:04:50Z.


Independently verified 32c0b4e0 against base 4a50cafc on Linux, RTX 3060, NVIDIA 615.78.08, Khronos validation 1.4.363.

  • Base reproduced all six shared-memory races under GPU-assisted validation despite correct output.
  • HEAD passed with zero validation errors and all eight expected words preserved.
  • A deliberate b96 → b128 mutation corrupted the zero sentinel as expected, confirming test sensitivity.
  • Both assembly sources produced byte-identical SPIR-V and passed spirv-val. Focused semantic tests passed 4/4.

No blocking issues found. This independently confirms the reported fix on Linux with an older validation-layer version.

AI-assisted testing.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7145775546 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1309#issuecomment-7145775546). Originally posted by [moffington](https://github.com/moffington) on 2026-11-24T22:04:50Z. --- Independently verified `32c0b4e0` against base `4a50cafc` on Linux, RTX 3060, NVIDIA 615.78.08, Khronos validation 1.4.363. - Base reproduced all six shared-memory races under GPU-assisted validation despite correct output. - HEAD passed with zero validation errors and all eight expected words preserved. - A deliberate b96 → b128 mutation corrupted the zero sentinel as expected, confirming test sensitivity. - Both assembly sources produced byte-identical SPIR-V and passed spirv-val. Focused semantic tests passed 4/4. No blocking issues found. This independently confirms the reported fix on Linux with an older validation-layer version. AI-assisted testing.
QemmHD commented 2026-11-25 02:36:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-25T02:36:36Z.


Merging.

Why merged: Only lane 0 of the wide-LDS fixture writes, which removes a write race from the test. moffington verified it with GPU-assisted validation.

Why it's good: Docs tests pass. It's a fixture-only change.

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main b4b7756e8. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main 3ff2a2adc (after #984): no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7150945919 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1309#issuecomment-7150945919). Originally posted by [QemmHD](https://github.com/QemmHD) on 2026-11-25T02:36:36Z. --- Merging. **Why merged:** Only lane 0 of the wide-LDS fixture writes, which removes a write race from the test. moffington verified it with GPU-assisted validation. **Why it's good:** Docs tests pass. It's a fixture-only change. Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main b4b7756e8. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main 3ff2a2adc (after #984): no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
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!1309
No description provided.