Conservative raster tests: copy shader fixtures through shader_fixture_path #3366

Merged
MoonEyes merged 1 commit from upstream-pr/3366 into main 2026-12-03 18:05:49 +00:00
MoonEyes commented 2026-12-03 16:32:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T16:32:02Z.


Claimed in the coordination issue as: conservative raster tests fixture copies (claim comment in #3312)

Depends on: #3359 (same helper and pattern; the files are distinct, git merge-tree against #3359, #3362 and #3363 is clean)

What and why

d3d12_conservative_raster_test, d3d12_conservative_tier2_test and d3d12_conservative_tier3_test copy their two shaders with a raw, throwing std::filesystem::copy_file(LEONIDA_*_SPV, ...). From the extracted runtime-windows artifact the baked-in path does not exist and the test aborts with 0xC0000409 (as in #2978). Each pair now goes through testfiles::copy_file(vktest::shader_fixture_path(MACRO), dest) and returns 1 on failure, from int main. Unchanged behaviour when the compiled path exists; no new helper, CMakeLists.txt untouched.

Tested

  • python -I scripts/check_no_game_data.py and cmake -S runtime configure on Linux.
  • Read-only review: return 1 is directly in main in all three files, signatures and includes, no raw copy left, lines at most 120 columns, no CRLF; after merging #3359, #3362, #3363 and this branch no raw copy_file of a shader macro is left in runtime/test.
  • Not run: compilation (MSVC, 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.
  • No game data, keys or decryption.
  • Not a translator rule.

Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5630633453 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3366). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T16:32:02Z. --- Claimed in the coordination issue as: conservative raster tests fixture copies (claim comment in #3312) Depends on: #3359 (same helper and pattern; the files are distinct, `git merge-tree` against #3359, #3362 and #3363 is clean) ### What and why `d3d12_conservative_raster_test`, `d3d12_conservative_tier2_test` and `d3d12_conservative_tier3_test` copy their two shaders with a raw, throwing `std::filesystem::copy_file(LEONIDA_*_SPV, ...)`. From the extracted `runtime-windows` artifact the baked-in path does not exist and the test aborts with 0xC0000409 (as in #2978). Each pair now goes through `testfiles::copy_file(vktest::shader_fixture_path(MACRO), dest)` and returns 1 on failure, from `int main`. Unchanged behaviour when the compiled path exists; no new helper, `CMakeLists.txt` untouched. ### Tested - `python -I scripts/check_no_game_data.py` and `cmake -S runtime` configure on Linux. - Read-only review: `return 1` is directly in `main` in all three files, signatures and includes, no raw copy left, lines at most 120 columns, no CRLF; after merging #3359, #3362, #3363 and this branch no raw `copy_file` of a shader macro is left in `runtime/test`. - Not run: compilation (MSVC, 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. - [x] No game data, keys or decryption. - [x] Not a translator rule. --- _Generated by [Claude Code](https://claude.ai/code)_
merzleckeier commented 2026-12-03 16:42:37 +00:00 (Migrated from github.com)

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


I reviewed db6a4707 against 717b9023. The merge is clean, and main already has the same shader_fixture_path.h blob as this PR.

I compiled the exact three copy blocks with GCC in a synthetic Linux harness using the five fixture filenames from CMake. With the original build paths absent and fixtures under generated/, all three original blocks aborted and all three PR blocks copied the expected bytes. With both copies present, all three preferred the build-path fixtures and overwrote the staged files. With the packaged pixel shader missing, each PR block returned 1 and logged the missing path.

This covers file lookup and copy behavior. The full Windows D3D12 tests were not run. Review assisted by OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7385310259 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3366#issuecomment-7385310259). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T16:42:37Z. --- I reviewed `db6a4707` against `717b9023`. The merge is clean, and `main` already has the same `shader_fixture_path.h` blob as this PR. I compiled the exact three copy blocks with GCC in a synthetic Linux harness using the five fixture filenames from CMake. With the original build paths absent and fixtures under `generated/`, all three original blocks aborted and all three PR blocks copied the expected bytes. With both copies present, all three preferred the build-path fixtures and overwrote the staged files. With the packaged pixel shader missing, each PR block returned 1 and logged the missing path. This covers file lookup and copy behavior. The full Windows D3D12 tests were not run. Review assisted by OpenAI Codex.
Kal0s-design commented 2026-12-03 17:14:46 +00:00 (Migrated from github.com)

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


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

No findings. This adds the full Windows D3D12 run the comment above left out. MSVC build (CMake + Ninja, RelWithDebInfo) of the three targets, no new warnings in the touched files. The five .spv fixtures aren't 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_conservative_raster_test 0 / 0 0xC0000409 / 0 0xC0000409 / 1
d3d12_conservative_tier2_test 0 / 0 0xC0000409 / 0 0xC0000409 / 1
d3d12_conservative_tier3_test 0 / 0 0xC0000409 / 0 0xC0000409 / 1

With the fixture gone, each one prints cannot copy ... naming the vertex shader and exits 1. In the artifact-style run the scenario counts match the normal run (48 pairs, 16 scenes + 480 degenerate cases, 48 pairs). The main column was measured on 717b90233; nothing under runtime/ changed since.

Not checked: a real downloaded CI artifact, CTest itself.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7386199996 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3366#issuecomment-7386199996). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-03T17:14:46Z. --- Ran natively on Windows 11, head `db6a4707f` merged into current `main` (`fba6f09ce`, clean merge). No findings. This adds the full Windows D3D12 run the comment above left out. MSVC build (CMake + Ninja, RelWithDebInfo) of the three targets, no new warnings in the touched files. The five `.spv` fixtures aren't 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_conservative_raster_test` | 0 / 0 | 0xC0000409 / 0 | 0xC0000409 / 1 | | `d3d12_conservative_tier2_test` | 0 / 0 | 0xC0000409 / 0 | 0xC0000409 / 1 | | `d3d12_conservative_tier3_test` | 0 / 0 | 0xC0000409 / 0 | 0xC0000409 / 1 | With the fixture gone, each one prints `cannot copy ...` naming the vertex shader and exits 1. In the artifact-style run the scenario counts match the normal run (48 pairs, 16 scenes + 480 degenerate cases, 48 pairs). The `main` column was measured on `717b90233`; nothing under `runtime/` changed since. Not checked: a real downloaded CI artifact, CTest itself. GPUs tested: one NVIDIA desktop card (native Vulkan). AI-assisted: yes (Claude Code).
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!3366
No description provided.