Package generated shader directories with the Windows runtime tests #3368

Open
merzleckeier wants to merge 2 commits from upstream-pr/3368 into main
merzleckeier commented 2026-12-03 16:52:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T16:52:18Z.


Claimed as CI-RUNTIME-WINDOWS-FIXTURE-DIRS in #3312, following the directory fixture finding.

Depends on: none. The file lookup helper is already on main.

What changed

The Windows runtime artifact uploads the top-level generated/*.spv files, but leaves out the directories that hold test shader indexes, modules, stubs, and synthetic FSSM programs. Several test executables also use the CI runner’s absolute build path for those directories.

Package the generated shader test directories and use the same local-build-first lookup as the existing individual file fixtures. After extraction, the C++ tests resolve their directory under generated/ and retain its nested layout. This also supplies the bindless shaders whose paths the Wine runner already remaps from CTest arguments.

Verification

  • Built the synthetic fixtures from the current CMake recipes. The Actions glob selected all nine generated shader directories with the new pattern. A local ZIP and extraction check failed with the old pattern and passed with the new one, opening the M15 index and FSSM plus nested subgroup shaders.
  • The C++ regression covers packaged fallback, preference for the local build, and the behavior when a candidate is the wrong file type. It passed under GCC 16.2.1, and an independent no-fallback control failed.
  • The portable Linux CTest suite had 55 passes and one skip. git diff --check and the no-game-data check passed.
  • The Windows/MSVC and Wine jobs cover the remaining platform validation. GPUs tested: none.

AI-assisted with OpenAI Codex. Independently reviewed read-only by GPT-6.2 Sol.

Checklist

  • Based on the current main.
  • One topic.
  • Synthetic fixtures only.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5630981599 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3368). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T16:52:18Z. --- Claimed as `CI-RUNTIME-WINDOWS-FIXTURE-DIRS` in [#3312](https://github.com/ProjectLeonida/mandy/issues/3312#issuecomment-7385422338), following the [directory fixture finding](https://github.com/ProjectLeonida/mandy/issues/3312#issuecomment-7385000128). Depends on: none. The file lookup helper is already on `main`. ### What changed The Windows runtime artifact uploads the top-level `generated/*.spv` files, but leaves out the directories that hold test shader indexes, modules, stubs, and synthetic FSSM programs. Several test executables also use the CI runner’s absolute build path for those directories. Package the generated shader test directories and use the same local-build-first lookup as the existing individual file fixtures. After extraction, the C++ tests resolve their directory under `generated/` and retain its nested layout. This also supplies the bindless shaders whose paths the Wine runner already remaps from CTest arguments. ### Verification - Built the synthetic fixtures from the current CMake recipes. The Actions glob selected all nine generated shader directories with the new pattern. A local ZIP and extraction check failed with the old pattern and passed with the new one, opening the M15 index and FSSM plus nested subgroup shaders. - The C++ regression covers packaged fallback, preference for the local build, and the behavior when a candidate is the wrong file type. It passed under GCC 16.2.1, and an independent no-fallback control failed. - The portable Linux CTest suite had 55 passes and one skip. `git diff --check` and the no-game-data check passed. - The Windows/MSVC and Wine jobs cover the remaining platform validation. GPUs tested: none. AI-assisted with OpenAI Codex. Independently reviewed read-only by GPT-6.2 Sol. ### Checklist - [x] Based on the current `main`. - [x] One topic. - [x] Synthetic fixtures only.
Kal0s-design commented 2026-12-03 17:31:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-03T17:31:49Z.


Ran natively on Windows 11, head b9599fe5f merged into current main (09273248c, clean merge).

One finding, about CI rather than the code. The Windows job doesn't build any of these nine tests today, so the new glob has nothing to package. In the last Runtime run on main (46705543929, at 9f0d351cc), the configure step prints llvm-mc (set LLVM_MC) or the SDK's spirv-as/spirv-val not found for translated_draw, m2_textured, m2_formats, m3_frame, m4_compute and buffer_uav, and a second line saying d3d12_subgroup_test is not built. rect_list, quad_index and the vk_bindless_ps_* tests sit behind the same check and don't appear in that log at all. The workflow on current main still installs only glslang in the Windows job, and VULKAN_SDK there is the headers checkout, so the result should be the same now. That means runtime/build/generated/*_shaders/** matches nothing, and if-no-files-found: error won't notice because the other patterns still match. The tests aren't in ctest.json for Wine either. The lookup and the glob work (results below), but the Windows/MSVC and Wine jobs won't exercise them until the Windows job gets an AMDGPU llvm-mc and SPIRV-Tools. The #3312 finding left the packaging question open, so this is the remaining piece.

I built the nine tests and shader_fixture_path_test with MSVC (CMake + Ninja, RelWithDebInfo). The warnings in the touched test files are the same as on main. The build generated all eight directories the tests look up into its own generated/, including subgroup_shaders/glsl/*.spv and subgroup_shaders/ps_w64_native/spirv/. On the merge shader_fixture_path_test prints shader fixture lookup passed and exits 0. To mimic the artifact I hid the build's generated/ and ran each exe (left next to its DLLs) from a working directory holding a copy of it as generated/, subdirectories included. For the missing case I hid it and ran from an empty folder.

test normal run, main / merge compiled path gone, generated/ in cwd, main / merge directory missing, main / merge
d3d12_buffer_uav_test 0 / 0 1 / 0 1 / 1
d3d12_m2_formats_test 0 / 0 1 / 0 1 / 1
d3d12_m2_textured_test 0 / 0 1 / 0 1 / 1
d3d12_m3_frame_test 0 / 0 1 / 0 1 / 1
d3d12_m4_compute_test 0 / 0 1 / 0 1 / 1
d3d12_quad_index_test 0 / 0 1 / 0 1 / 1
d3d12_rect_list_test 0 / 0 1 / 0 1 / 1
d3d12_subgroup_test 0 / 0 1 / 0 1 / 1
d3d12_translated_draw_test 0 / 0 1 / 0 1 / 1

Unlike the single-file fixtures, these fail cleanly on main, exiting 1 on an EXPECT for library.load(...) or the FSSM program sizes, with no 0xC0000409. With the directory missing, the merge prints the same EXPECT lines, one line lower because of the new include. In the artifact-style run the merge's translated shaders ... from line names the copied generated/<name>_shaders/spirv, and for subgroup it names generated/subgroup_shaders/w64_emulated/spirv. Every result line matches the normal run: M3 6 frames and 3555 samples, M4 1924 words, buffer UAV 21394 values, m2_formats 14 cases, M1.5 4064 of 4096 exact plus 32 edge pixels, subgroup 2 shaders judged exact. The main column came from the same build tree with the same generated fixtures.

The tests look up m15_shaders (translated_draw and rect_list), quad_shaders, m2_shaders, m2f_shaders, m3_shaders, m4_shaders, buffer_uav_shaders and subgroup_shaders, and the bindless CTest arguments point into bindless_shaders. In runtime/CMakeLists.txt those are the only directories under generated/, and all nine match generated/*_shaders/**. The local tree has no dot-files that upload-artifact would skip. None of the nine tests still builds a raw std::filesystem::path(LEONIDA_TEST_*_DIR). Under Wine, run_wine_tests.py already maps the Windows checkout's drive onto the Linux one, so the compiled absolute paths would resolve there once the files are packaged. The cwd fallback matters when that mapping is skipped or someone extracts the artifact by hand.

Not checked: a real downloaded CI artifact, the Wine job, vk_bindless_test with bindless_shaders (not built here), CTest itself.

GPUs tested: one NVIDIA desktop card (native Vulkan).
AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7386657469 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3368#issuecomment-7386657469). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-03T17:31:49Z. --- Ran natively on Windows 11, head `b9599fe5f` merged into current `main` (`09273248c`, clean merge). One finding, about CI rather than the code. The Windows job doesn't build any of these nine tests today, so the new glob has nothing to package. In the last Runtime run on `main` (46705543929, at `9f0d351cc`), the configure step prints `llvm-mc (set LLVM_MC) or the SDK's spirv-as/spirv-val not found` for translated_draw, m2_textured, m2_formats, m3_frame, m4_compute and buffer_uav, and a second line saying `d3d12_subgroup_test is not built`. `rect_list`, `quad_index` and the `vk_bindless_ps_*` tests sit behind the same check and don't appear in that log at all. The workflow on current `main` still installs only glslang in the Windows job, and `VULKAN_SDK` there is the headers checkout, so the result should be the same now. That means `runtime/build/generated/*_shaders/**` matches nothing, and `if-no-files-found: error` won't notice because the other patterns still match. The tests aren't in `ctest.json` for Wine either. The lookup and the glob work (results below), but the Windows/MSVC and Wine jobs won't exercise them until the Windows job gets an AMDGPU `llvm-mc` and SPIRV-Tools. The #3312 finding left the packaging question open, so this is the remaining piece. I built the nine tests and `shader_fixture_path_test` with MSVC (CMake + Ninja, RelWithDebInfo). The warnings in the touched test files are the same as on `main`. The build generated all eight directories the tests look up into its own `generated/`, including `subgroup_shaders/glsl/*.spv` and `subgroup_shaders/ps_w64_native/spirv/`. On the merge `shader_fixture_path_test` prints `shader fixture lookup passed` and exits 0. To mimic the artifact I hid the build's `generated/` and ran each exe (left next to its DLLs) from a working directory holding a copy of it as `generated/`, subdirectories included. For the missing case I hid it and ran from an empty folder. | test | normal run, `main` / merge | compiled path gone, `generated/` in cwd, `main` / merge | directory missing, `main` / merge | |---|---|---|---| | `d3d12_buffer_uav_test` | 0 / 0 | 1 / 0 | 1 / 1 | | `d3d12_m2_formats_test` | 0 / 0 | 1 / 0 | 1 / 1 | | `d3d12_m2_textured_test` | 0 / 0 | 1 / 0 | 1 / 1 | | `d3d12_m3_frame_test` | 0 / 0 | 1 / 0 | 1 / 1 | | `d3d12_m4_compute_test` | 0 / 0 | 1 / 0 | 1 / 1 | | `d3d12_quad_index_test` | 0 / 0 | 1 / 0 | 1 / 1 | | `d3d12_rect_list_test` | 0 / 0 | 1 / 0 | 1 / 1 | | `d3d12_subgroup_test` | 0 / 0 | 1 / 0 | 1 / 1 | | `d3d12_translated_draw_test` | 0 / 0 | 1 / 0 | 1 / 1 | Unlike the single-file fixtures, these fail cleanly on `main`, exiting 1 on an `EXPECT` for `library.load(...)` or the FSSM program sizes, with no 0xC0000409. With the directory missing, the merge prints the same `EXPECT` lines, one line lower because of the new include. In the artifact-style run the merge's `translated shaders ... from` line names the copied `generated/<name>_shaders/spirv`, and for subgroup it names `generated/subgroup_shaders/w64_emulated/spirv`. Every result line matches the normal run: M3 6 frames and 3555 samples, M4 1924 words, buffer UAV 21394 values, m2_formats 14 cases, M1.5 4064 of 4096 exact plus 32 edge pixels, subgroup 2 shaders judged exact. The `main` column came from the same build tree with the same generated fixtures. The tests look up `m15_shaders` (translated_draw and rect_list), `quad_shaders`, `m2_shaders`, `m2f_shaders`, `m3_shaders`, `m4_shaders`, `buffer_uav_shaders` and `subgroup_shaders`, and the bindless CTest arguments point into `bindless_shaders`. In `runtime/CMakeLists.txt` those are the only directories under `generated/`, and all nine match `generated/*_shaders/**`. The local tree has no dot-files that upload-artifact would skip. None of the nine tests still builds a raw `std::filesystem::path(LEONIDA_TEST_*_DIR)`. Under Wine, `run_wine_tests.py` already maps the Windows checkout's drive onto the Linux one, so the compiled absolute paths would resolve there once the files are packaged. The cwd fallback matters when that mapping is skipped or someone extracts the artifact by hand. Not checked: a real downloaded CI artifact, the Wine job, `vk_bindless_test` with `bindless_shaders` (not built here), CTest itself. GPUs tested: one NVIDIA desktop card (native Vulkan). AI-assisted: yes (Claude Code).
merzleckeier commented 2026-12-03 17:37:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T17:37:00Z.


Additional Windows-path verification for b9599fe5: I compiled runtime/test/shader_fixture_path_test.cpp with Clang-cl and the Windows SDK, then ran it under Wine. It passed, including the UTF-8 path and directory fallback cases.

A second Windows executable checked two locally assembled archives under Wine. With the old upload pattern, it returned 1 for the missing M15 index. With the PR pattern, it opened the packaged M15 index and FSSM fixture plus the nested subgroup files and returned 0. Both archives used synthetic fixtures. The hosted Windows/Wine run is still building. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7386794348 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3368#issuecomment-7386794348). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T17:37:00Z. --- Additional Windows-path verification for `b9599fe5`: I compiled `runtime/test/shader_fixture_path_test.cpp` with Clang-cl and the Windows SDK, then ran it under Wine. It passed, including the UTF-8 path and directory fallback cases. A second Windows executable checked two locally assembled archives under Wine. With the old upload pattern, it returned 1 for the missing M15 index. With the PR pattern, it opened the packaged M15 index and FSSM fixture plus the nested subgroup files and returned 0. Both archives used synthetic fixtures. The [hosted Windows/Wine run](https://github.com/merzleckeier/mandy/actions/runs/47156807996) is still building. AI-assisted with OpenAI Codex.
merzleckeier commented 2026-12-03 17:44:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T17:44:01Z.


Thanks for tracing the missing fixtures to the Windows configure step. 3ab24191 installs LLVM and SPIRV-Tools via the pinned MSYS2 UCRT64 setup action, checks that llvm-mc supports AMDGPU, and gives CMake the three tool paths explicitly. Before uploading the Wine artifact, Windows now checks that the fixture indexes and subgroup probe exist and are nonempty.

Local PowerShell checks preserved Windows paths with spaces and rejected a missing validator, an LLVM build without AMDGPU, and missing or empty generated output. The independent workflow review found no blockers. The GitHub-hosted Runtime run is running the exact new PR head.

AI-assisted with OpenAI Codex. Independently reviewed read-only by GPT-6.2 Sol.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7386975747 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3368#issuecomment-7386975747). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T17:44:01Z. --- Thanks for tracing the missing fixtures to the Windows configure step. `3ab24191` installs LLVM and SPIRV-Tools via the pinned MSYS2 UCRT64 setup action, checks that `llvm-mc` supports AMDGPU, and gives CMake the three tool paths explicitly. Before uploading the Wine artifact, Windows now checks that the fixture indexes and subgroup probe exist and are nonempty. Local PowerShell checks preserved Windows paths with spaces and rejected a missing validator, an LLVM build without AMDGPU, and missing or empty generated output. The independent workflow review found no blockers. The [GitHub-hosted Runtime run](https://github.com/merzleckeier/mandy/actions/runs/47165667880) is running the exact new PR head. AI-assisted with OpenAI Codex. Independently reviewed read-only by GPT-6.2 Sol.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3368:upstream-pr/3368'
git switch 'upstream-pr/3368'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3368'
git switch 'upstream-pr/3368'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3368'
git switch 'upstream-pr/3368'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3368'
git switch 'main'
git merge --squash 'upstream-pr/3368'
git switch 'main'
git merge --ff-only 'upstream-pr/3368'
git switch 'main'
git merge 'upstream-pr/3368'
git push origin 'main'
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!3368
No description provided.