Runtime tests: read shader fixtures through shader_fixture_path #3362

Manually merged
github merged 2 commits from github-bot/gh-3362 into gh-pr/3362/base 2026-12-03 18:06:50 +00:00 AGit
Owner

@⁠MoonEyes on GitHub · 2026-12-03 16:26 UTC · original
ProjectLeonida:fix/runtime-test-fixture-readers → main · +9 −5 · 5 files · 2 commits · merged 2026-12-03 17:55 UTC

Claimed in the coordination issue as: runtime tests reading a compiled-in shader path (claim comment in #3312)

Depends on: #3359 (same helper, vktest::shader_fixture_path; the files are distinct, so there is no conflict)

What and why

Five tests still opened the shader at the path baked in on the CI runner (std::ifstream on a LEONIDA_*_SPV define). Run from the extracted runtime-windows artifact they read an empty file and fail. Their reader helpers (read_spv, read_spirv, load_spirv) and one direct ifstream in d3d12_fspx_compute_test.cpp now go through vktest::shader_fixture_path, which keeps the compiled path if it exists and else falls back to generated/<name>. The const char* overload is kept, because it decodes the UTF-8 CMake gives; a plain implicit conversion would use the ANSI code page on Windows. Three files from the original list (vk_null_descriptor_test, vk_bindless_dimensions_test, the copy half of d3d12_fspx_compute_test) were already covered on main.

Tested

  • python -I scripts/check_no_game_data.py and cmake -S runtime configure on Linux.
  • Read-only review: the overload, the callers of each helper (all pass a CMake macro), the includes and the absence of other raw readers of the same pattern; the review also found the fspx read, now fixed.
  • Not run: compilation (MSVC, Vulkan, GPU) and the tests from an extracted artifact, so no red/green.

GPUs tested: n/a

AI-assisted: yes. Written with Claude Sonnet 5.5; independently reviewed read-only by Claude Opus 5.5.

Checklist

  • Based on current main and merges cleanly.
  • One topic; the throwing copy_file variants are a separate pull request.
  • No game data, keys or decryption.
  • Not a translator rule.

Generated by Claude Code

**@⁠MoonEyes** on GitHub · 2026-12-03 16:26 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3362) `ProjectLeonida:fix/runtime-test-fixture-readers` → `main` · +9 −5 · 5 files · 2 commits · merged 2026-12-03 17:55 UTC Claimed in the coordination issue as: runtime tests reading a compiled-in shader path (claim comment in #3312) Depends on: #3359 (same helper, `vktest::shader_fixture_path`; the files are distinct, so there is no conflict) ### What and why Five tests still opened the shader at the path baked in on the CI runner (`std::ifstream` on a `LEONIDA_*_SPV` define). Run from the extracted `runtime-windows` artifact they read an empty file and fail. Their reader helpers (`read_spv`, `read_spirv`, `load_spirv`) and one direct `ifstream` in `d3d12_fspx_compute_test.cpp` now go through `vktest::shader_fixture_path`, which keeps the compiled path if it exists and else falls back to `generated/<name>`. The `const char*` overload is kept, because it decodes the UTF-8 CMake gives; a plain implicit conversion would use the ANSI code page on Windows. Three files from the original list (`vk_null_descriptor_test`, `vk_bindless_dimensions_test`, the copy half of `d3d12_fspx_compute_test`) were already covered on `main`. ### Tested - `python -I scripts/check_no_game_data.py` and `cmake -S runtime` configure on Linux. - Read-only review: the overload, the callers of each helper (all pass a CMake macro), the includes and the absence of other raw readers of the same pattern; the review also found the `fspx` read, now fixed. - Not run: compilation (MSVC, Vulkan, GPU) and the tests from an extracted artifact, so no red/green. GPUs tested: n/a AI-assisted: yes. Written with Claude Sonnet 5.5; independently reviewed read-only by Claude Opus 5.5. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; the throwing `copy_file` variants are a separate pull request. - [x] No game data, keys or decryption. - [x] Not a translator rule. --- _Generated by [Claude Code](https://claude.ai/code)_
d3d12_indirect_rt_test, d3d12_r9g9b9e5_uav_test, vk_aftermath_test and
vk_title_mirror_test opened the compiled fixture path as is, so an extracted
runtime-windows artifact (fixtures under generated/) failed with a missing
file. Their SPIR-V readers now go through vktest::shader_fixture_path, whose
const char* overload keeps the CMake-supplied UTF-8 path decoding.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DDMsHwsknvo96XTWag2WiL
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DDMsHwsknvo96XTWag2WiL
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 16:32:39 +00:00
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-03 17:14 UTC · original

Ran natively on Windows 11, head 0a7d4573c merged into current main (fba6f09ce, clean merge).

No findings. MSVC build (CMake + Ninja, RelWithDebInfo) of the touched targets, no new warnings in them. None of the fixtures are in the checkout; glslangValidator compiles them into the build's generated/. To mimic the artifact I hid that folder and ran each exe from a directory with a copy of it as generated/.

test normal run, main / merge compiled path gone, generated/ in cwd, main / merge fixture missing, main / merge
d3d12_fspx_compute_test 0 / 0 1 (EXPECT words.size() > 12, the raw ifstream) / 0 1 / 1
d3d12_indirect_rt_test 0 / 0 1 (FAIL: read vs_tri/fs_solid spv) / 0 1 / 1
d3d12_r9g9b9e5_uav_test 0 / 0 1 (bindless round trip, after the UAV clears and copies pass) / 0 1 / 1
vk_title_mirror_test 77 / 77 77 / 77 77 / 77

So the three tests that run here go red to green in the artifact layout. With the fixture really gone they still exit 1, as before. vk_title_mirror_test skips on this card (no host-visible coherent memory type for sparse buffers) before it loads the shader, so its change is only compiled. The main column was measured on 717b90233; nothing under runtime/ changed since.

Not checked: vk_aftermath_test (not a target in this configuration, so the change there isn't compiled here), a real downloaded CI artifact, CTest itself.

GPUs tested: one NVIDIA desktop card (native Vulkan), plus WARP where the tests compare with it.
AI-assisted: yes (Claude Code).

**@⁠Kal0s-design** on GitHub · 2026-12-03 17:14 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3362#issuecomment-7386198023) Ran natively on Windows 11, head `0a7d4573c` merged into current `main` (`fba6f09ce`, clean merge). No findings. MSVC build (CMake + Ninja, RelWithDebInfo) of the touched targets, no new warnings in them. None of the fixtures are in the checkout; glslangValidator compiles them into the build's `generated/`. To mimic the artifact I hid that folder and ran each exe from a directory with a copy of it as `generated/`. | test | normal run, `main` / merge | compiled path gone, `generated/` in cwd, `main` / merge | fixture missing, `main` / merge | |---|---|---|---| | `d3d12_fspx_compute_test` | 0 / 0 | 1 (`EXPECT words.size() > 12`, the raw `ifstream`) / 0 | 1 / 1 | | `d3d12_indirect_rt_test` | 0 / 0 | 1 (`FAIL: read vs_tri/fs_solid spv`) / 0 | 1 / 1 | | `d3d12_r9g9b9e5_uav_test` | 0 / 0 | 1 (bindless round trip, after the UAV clears and copies pass) / 0 | 1 / 1 | | `vk_title_mirror_test` | 77 / 77 | 77 / 77 | 77 / 77 | So the three tests that run here go red to green in the artifact layout. With the fixture really gone they still exit 1, as before. `vk_title_mirror_test` skips on this card (no host-visible coherent memory type for sparse buffers) before it loads the shader, so its change is only compiled. The `main` column was measured on `717b90233`; nothing under `runtime/` changed since. Not checked: `vk_aftermath_test` (not a target in this configuration, so the change there isn't compiled here), a real downloaded CI artifact, CTest itself. GPUs tested: one NVIDIA desktop card (native Vulkan), plus WARP where the tests compare with it. AI-assisted: yes (Claude Code).
github-bot changed target branch from main to gh-pr/3362/base 2026-12-03 18:06:34 +00:00
github manually merged commit 0a7d4573c9 into gh-pr/3362/base 2026-12-03 18:06:50 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3362
No description provided.