Runtime tests: read shader fixtures through shader_fixture_path #3362
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3362"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T16:26:12Z.
Claimed in the coordination issue as: runtime tests reading a compiled-in shader path (claim comment in #3312)
Depends on: #3359 (same helper,
vktest::shader_fixture_path; the files are distinct, so there is no conflict)What and why
Five tests still opened the shader at the path baked in on the CI runner (
std::ifstreamon aLEONIDA_*_SPVdefine). Run from the extractedruntime-windowsartifact they read an empty file and fail. Their reader helpers (read_spv,read_spirv,load_spirv) and one directifstreamind3d12_fspx_compute_test.cppnow go throughvktest::shader_fixture_path, which keeps the compiled path if it exists and else falls back togenerated/<name>. Theconst char*overload is kept, because it decodes the UTF-8 CMake gives; a plain implicit conversion would use the ANSI code page on Windows. Three files from the original list (vk_null_descriptor_test,vk_bindless_dimensions_test, the copy half ofd3d12_fspx_compute_test) were already covered onmain.Tested
python -I scripts/check_no_game_data.pyandcmake -S runtimeconfigure on Linux.fspxread, now fixed.GPUs tested: n/a
AI-assisted: yes. Written with Claude Sonnet 5.5; independently reviewed read-only by Claude Opus 5.5.
Checklist
mainand merges cleanly.copy_filevariants are a separate pull request.Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-03T17:14:42Z.
Ran natively on Windows 11, head
0a7d4573cmerged into currentmain(fba6f09ce, clean merge).No findings. MSVC build (CMake + Ninja, RelWithDebInfo) of the touched targets, no new warnings in them. None of the fixtures are 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 asgenerated/.main/ mergegenerated/in cwd,main/ mergemain/ merged3d12_fspx_compute_testEXPECT words.size() > 12, the rawifstream) / 0d3d12_indirect_rt_testFAIL: read vs_tri/fs_solid spv) / 0d3d12_r9g9b9e5_uav_testvk_title_mirror_testSo the three tests that run here go red to green in the artifact layout. With the fixture really gone they still exit 1, as before.
vk_title_mirror_testskips on this card (no host-visible coherent memory type for sparse buffers) before it loads the shader, so its change is only compiled. Themaincolumn was measured on717b90233; nothing underruntime/changed since.Not checked:
vk_aftermath_test(not a target in this configuration, so the change there isn't compiled here), a real downloaded CI artifact, CTest itself.GPUs tested: one NVIDIA desktop card (native Vulkan), plus WARP where the tests compare with it.
AI-assisted: yes (Claude Code).