Repository navigation
runtime: regenerate missing M15/M3/M4/buffer_uav shader modules on rebuild (#3854 follow-up) - #4888
kingzzim7-create wants to merge 1 commit into
Conversation
…build Follow-up to ItsNotRexed#3854 (found by tupacfan04 in its review): the M15, M3, M4 and buffer_uav fixture lists declared only index.json and the .fssm sidecars, so a deleted spirv/*.spv stayed missing after an incremental build and its test failed at CreateGraphicsPipelineState. Declare each fixture's .spv modules beside their .fssm, as ItsNotRexed#3854 does for M2/M2F.
whattheflop
left a comment
There was a problem hiding this comment.
Independent Windows CPU integration check, AI-assisted. This head merges cleanly into main d974c88a. Bringing in #3854 at 3d32aade leaves its existing M2 list conflict. I kept main's ps_m2_literal.fssm and added its corresponding ps_m2_literal.spv alongside the other pairs, as noted in the #3854 review. None of the four lists changed here conflicts with that resolution.
On resolved scratch tree 01dd4d13bc97532551529ca3f9ae6796e87fc5a9, the configured Ninja graph registered 42 outputs across M15, M2, M2F, M3, M4 and buffer UAV and all seven consuming CTests. Running the six configured generation commands with LLVM 21.1.8 through WSL generated 18 synthetic modules; all 18 passed spirv-val and matched their indexed FSSM hashes. Both focused Python suites passed (8 tests). This verifies the combined graph and generation, without repeating the deletion matrix or running the GPU tests.
|
Tested d90e8bf on RTX 5070, driver 616.86, Windows 10.0.26200: pass. Built
The rebuild re-ran the custom command ("Translating vs_m15 and ps_m15 for the translated draw test") and |
|
MERGE. One file Verified at graph level with Ninja + MSVC 19.51 and a forced No permanent-rebuild risk: Skipped here: real translation (no Approve. AI-assisted review, no game files. |
|
Thanks @tupacfan04, @whattheflop, @Ayinaki and @JRamos1993 for the checks, and for confirming it combines cleanly with #3854 and the new ps_m2_literal module. |
|
Tested d90e8bf merged with main 3faac55 on Windows 11 native, MSVC 14.51 (VS 18), Ninja, RelWithDebInfo, real llvm-mc 23.1.6 and spirv-as/spirv-val from the Vulkan tools, NVIDIA GeForce RTX 4080 SUPER (plus Linux/WSL2, Python 3.12.16, for the two CMake-related Python tests): pass.
|
|
Thanks @kapitche, especially for the negative control: 0/11 regenerated with main's CMakeLists vs 11/11 byte-identical with this change, on a second Ada card. |
|
Verified on current main (3faac55, merged cleanly): the four extended OUTPUT lists match exactly what runtime/test/shaders/build.py publishes for the shader names those custom commands pass it, so a build directory missing only the .spv files will now regenerate instead of failing the tests at runtime. compileall passes; the cmake build itself was not attempted here (CPU-only review box). Two same-shape gaps the PR leaves untouched (pre-existing on main): the M2/M2F blocks (runtime/CMakeLists.txt:1690, :1720) omit their .spv outputs the same way, and the .spvasm sidecars build.py also writes are tracked by no block — fine to follow up separately. This branch reports no CI checks. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
Thanks @memorypressure. M2/M2F are #3854's part; I tested its rebased head 7fda9b8 there (7/7 regenerated byte-identical, including ps_m2_literal). The .spvasm sidecars are left out on purpose: the tests load the .spv (a missing one is what fails at CreateGraphicsPipelineState), so this PR only declares what a test needs. Happy to add them in a follow-up if something starts reading them. |
Claimed
New BUILD item, claimed on #4816. A follow-up to #3854, found by @tupacfan04 in their review there.
What and why
#3854 fixes a silent incremental-build failure for the M2/M2F fixtures: their shader lists declare only
spirv/index.jsonand thefssm/*.fssmsidecars, so a translatedspirv/*.spvthat goes missing is invisible to the build graph. The build "succeeds", the module stays missing, and the test fails atCreateGraphicsPipelineState.Four more fixtures in
runtime/CMakeLists.txthave the same omission. This PR declares their.spvmodules beside each.fssm, in the same layout as #3854:LEONIDA_M15_FILES(d3d12_translated_draw)LEONIDA_M3_FILES(d3d12_m3_frame, d3d12_m3_first_pass)LEONIDA_M4_FILES(d3d12_m4_compute)LEONIDA_BUFFER_UAV_FILES(d3d12_buffer_uav)The M2/M2F lists are left to #3854. The two PRs change different lines of the same file, so they don't conflict.
Tested
Windows 11, VS 2026 (MSVC 14.52.37025), Ninja via
scripts/build_runtime.ps1, real llvm-mc 23.1.6 and SPIRV-Tools v2026.2 (no stub generator), NVIDIA RTX 4060 Ti, driver 621.01, main ec34b54.generated/m15_shaders/spirv/vs_m15.spvand rebuild. The file is not regenerated, andd3d12_translated_drawfails atCreateGraphicsPipelineState(line 167).d3d12_translated_draw,d3d12_m3_frame,d3d12_m3_first_pass,d3d12_m4_computeandd3d12_buffer_uavpass 5/5, and also 5/5 withLEONIDA_VK_VALIDATION=1.tests/test_ctest_registration.py4 OK,tests/test_shader_build_fallbacks.py4 OK.ctest: 100% passed, 0 failed out of 176.git diff --checkis clean. The diff is 1 file, +14 −9.Checklist
AI-assisted: yes (Claude).