Conservative raster tests: copy shader fixtures through shader_fixture_path #3366

Open
github-bot wants to merge 1 commit from github-bot/gh-3366 into main AGit
Owner

@⁠MoonEyes on GitHub · 2026-12-03 16:32 UTC · original
ProjectLeonida:fix/runtime-test-conservative-fixtures → main · +12 −6 · 3 files · 1 commits · open

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

**@⁠MoonEyes** on GitHub · 2026-12-03 16:32 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3366) `ProjectLeonida:fix/runtime-test-conservative-fixtures` → `main` · +12 −6 · 3 files · 1 commits · open 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)_
d3d12_conservative_raster_test, d3d12_conservative_tier2_test and
d3d12_conservative_tier3_test copied their compiled SPIR-V with a raw
std::filesystem::copy_file, which throws when the file is absent (as from the
extracted Windows CI artifact) and ends the test with 0xC0000409. Use
vktest::shader_fixture_path and testfiles::copy_file as the other runtime tests
do, returning 1 with the copy error on failure.

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:52:58 +00:00
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-03 16:42 UTC · original

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.

**@⁠merzleckeier** on GitHub · 2026-12-03 16:42 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3366#issuecomment-7385310259) 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.
Author
Owner

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

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

**@⁠Kal0s-design** on GitHub · 2026-12-03 17:14 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3366#issuecomment-7386199996) 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).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3366/head:github-bot/gh-3366'
git switch 'github-bot/gh-3366'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3366'
git switch 'github-bot/gh-3366'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3366'
git switch 'github-bot/gh-3366'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3366'
git switch 'main'
git merge --squash 'github-bot/gh-3366'
git switch 'main'
git merge --ff-only 'github-bot/gh-3366'
git switch 'main'
git merge 'github-bot/gh-3366'
git push origin 'main'
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!3366
No description provided.