Skip to content

Resolve packaged shaders in relocated GPU test artifacts - #2500

Merged
ItsNotRexed merged 1 commit into
mainfrom
unknown repository
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Nov 22, 2026

Copy link
Copy Markdown

Downloaded runtime-windows GPU test artifacts retain absolute LEONIDA_TEST_*_SPV paths from the CI checkout. On another Windows machine, compute/draw terminate on a missing fixture and descriptor sampling fails before its readback comparison.

Keep the original build-path lookup, then look for the same filename in generated/ under the test working directory. Apply that lookup to seven affected test programs and register a portable test for local-path precedence, packaged fallback, absent files and directories.

Claimed in #2300: #2300 (comment)

AI-assisted with Codex. The standalone shader_fixture_path_test passed on Windows x64 with Zig 0.13.0/C++20/-O1. The full MSVC test build has not been run locally.

To verify the observed failure independently, I redirected only compiled fixture path strings in local copies of the upstream artifact binaries (artifact 14762914636, revision 4eb6155). Compute and draw then advanced to the existing 144-byte push-constant requirement, which this RX 580 driver cannot meet (128 bytes). Descriptor sampling advanced from its missing-shader check to a later comparison failure. These binary-copy observations verify the fixture issue, not a rebuilt test of this source change. No game files were used.

@kacper-serewis

Copy link
Copy Markdown
Contributor

The relocated FSPX compute test still fails on 0cb7657d. At d3d12_fspx_compute_test.cpp line 176, the three fixture copies use the new lookup, but the subsequent std::ifstream opens LEONIDA_TEST_CS_SPV directly. Routing that read through vktest::shader_fixture_path would cover this case.

I rebuilt the seven changed GPU test programs and the lookup test with MSVC 19.50 (RelWithDebInfo) on Windows 11 build 26200.9974, NVIDIA RTX 5070 driver 616.56. All 8 passed in the build directory. I then copied the same executables and 12 synthetic SPIR-V files into an artifact-style directory, renamed the original generated directory, and ran from the artifact root.

  • 6/7 relocated GPU tests passed: compute, descriptor, draw, MSAA draw, pipeline library and set-0 compute. The separate lookup test also passed. Compute matched 64 elements in each of three dispatches, and the draw test matched all 4,096 resolved MSAA pixels.
  • FSPX compute stopped at line 178 (words.size() > 12). Restoring only generated/cs_user_data.spv at its original build path made the same relocated executable pass. Removing that single original fixture reproduced the line 178 failure.

Locally rebuilt PR binaries and synthetic fixtures only. AI-assisted verification.

@umnitus

umnitus commented Nov 22, 2026

Copy link
Copy Markdown

Tested 0cb7657 on RTX 3060 12 GB, NVIDIA 621.14, Vulkan 1.4.357, Windows 11 26H2.

I built the unmodified PR with clang-cl 23.1.6, Windows SDK 10.0.26100 and Ninja. I copied the EXEs and generated/ to a fresh directory on E:, temporarily renamed the original generated/ directory, and ran the tests from the relocated copy.

shader_fixture_path_test, d3d12_draw_test and d3d12_set0_compute_test all passed (exit 0). Draw readback matched all 4,096 pixels in the M1 scene, strip-cut and 4x MSAA checks. The four set-0 compute dispatches also passed.

These are the two GPU executables that failed to launch in my earlier downloaded CI artifact. This was a locally rebuilt relocation check. I did not run the FSPX executable or enable Vulkan validation layers. AI-assisted verification.

@ghost

ghost commented Nov 22, 2026

Copy link
Copy Markdown
Author

MSVC validation is now available: https://github.com/aidity1377/Leonida/actions/runs/45048707209 compiled the Windows runtime and tests successfully, and the Linux job succeeded. Windows CTest failed d3d12_msaa_draw, also failed by the separate #2402 build; this PR does not claim a full-suite pass.

Downloaded this run's unmodified runtime-windows artifact to a different Windows checkout and ran shader_fixture_path_test: passed. Its unmodified d3d12_compute_test now loads the packaged fixture successfully and reaches the expected PSO refusal on this 128-byte RX 580 device, instead of aborting due to the CI-machine fixture path. No binary rewriting was used for this source-change verification.

Separately, #2402's fallback compute and draw tests passed on this physical RX 580 (reported on that PR). No game files were used.

@ghost
ghost marked this pull request as ready for review November 22, 2026 17:31
@bielfreedom

Copy link
Copy Markdown

Tested 0cb7657d (on its base 49475796) with the full MSVC build the PR notes hadn't been run yet: Windows 11 Pro build 26200, MSVC (VS Build Tools, RelWithDebInfo, Ninja), AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32029.2010), Vulkan validation on (LEONIDA_VK_VALIDATION=1, Vulkan SDK 1.4.363): pass.

  • Builds clean with MSVC.
  • shader_fixture_path (the new test) passes.
  • Full ctest: 116/116 pass, 0 failures, 0 validation errors, including the seven test programs that now go through the lookup (they still find their fixtures at the build path).

This was an in-place build, so it covers the original build-path lookup. I didn't relocate the binaries to exercise the generated/ fallback.

AI-assisted (Claude Code). No game files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants