Conservative raster tests: copy shader fixtures through shader_fixture_path #3366

Code

Clone this repository

Checkout

From your project repository, check out a new branch and test the changes.

git fetch -u origin "github-pr/3366:github-pr/3366"
git switch "github-pr/3366"
Open
leonida/mandy
MoonEyes wants to merge 1 commit from github-pr/3366 into main

This branch is out-of-date with the base branch

Conversation
Reviewers 0 approvals
  • No reviewers
Details
This pull request is blocked because it's outdated.
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 'github-pr/3366:github-pr/3366'
git switch 'github-pr/3366'
MoonEyes commented 2026-12-03 16:32:02 +00:00

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

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

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.

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

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

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

Both fixtures now go through shader_fixture_path and testfiles::copy_file, which returns false instead of throwing, and returning 1 turns that into a failed run rather than an abort. Checked that copy_file exists in test_temp_dir.h and is already used by the other GPU tests. No objection.

Both fixtures now go through `shader_fixture_path` and `testfiles::copy_file`, which returns false instead of throwing, and returning 1 turns that into a failed run rather than an abort. Checked that `copy_file` exists in `test_temp_dir.h` and is already used by the other GPU tests. No objection.
Sign in to join this conversation.
No description provided.