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

Manually merged
github merged 1 commit from gh-pr/1309/head into gh-pr/1309/base 2026-11-26 09:46:53 +00:00
Owner

@⁠BadgersMC on GitHub · 2026-11-24 21:40 UTC · original
BadgersMC:fix/lds-wide-fixture → main · +3 −3 · 2 files · 1 commits · merged 2026-11-25 02:36 UTC

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.
**@⁠BadgersMC** on GitHub · 2026-11-24 21:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1309) `BadgersMC:fix/lds-wide-fixture` → `main` · +3 −3 · 2 files · 1 commits · merged 2026-11-25 02:36 UTC Claimed in the coordination issue as [TEST-LDS-WIDE-GPUAV](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14). ### 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:46:50 +00:00
github manually merged commit 32c0b4e020 into gh-pr/1309/base 2026-11-26 09:46:53 +00:00
Author
Owner

@⁠moffington on GitHub · 2026-11-24 22:04 UTC · original

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.

**@⁠moffington** on GitHub · 2026-11-24 22:04 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1309#issuecomment-7145775546) 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.
Author
Owner

@⁠QemmHD on GitHub · 2026-11-25 02:36 UTC · original

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).

**@⁠QemmHD** on GitHub · 2026-11-25 02:36 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1309#issuecomment-7150945919) 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).
This discussion has been locked. Commenting is limited to contributors.
No description provided.