Repository navigation
cmake: generated/ exists at configure time and before vk_null_descriptor_test's rule; no "Failed to open file" on a fresh build (BUILD-NULL-DESCRIPTOR-GENERATED-DIR) - #2096
Conversation
…ngValidator writes into it On a fresh macOS or Linux build tree nothing has made generated/ when this rule runs, so glslangValidator stops with "Failed to open file" and the build of vk_null_descriptor_test fails (and every test after it in ctest). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged AI-assisted (Claude Code). |
… it can run first From wavehs's finding in ProjectLeonida#1608: the per-rule make_directory covered only the null-descriptor shader, and the other generated/*.spv rules relied on being ordered after a rule that made the folder. A fresh -j8 build on macOS now goes through without Failed to open file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Updated with On an Apple M3 (macOS 26.5.1): a fresh AI-assisted (Claude Code). |
Andretuta
left a comment
There was a problem hiding this comment.
Verified c94bc3003 on Windows (MSVC 19.44, NMake clean build + RTX 3060): without this change, a clean NMake build fails with Failed to open file on generated/cs_bindless_dimensions.spv; with c94bc3003, generated/ is created at configure time, both targets build cleanly, and ctest passes 2/2 (vk_null_descriptor and vk_bindless_dimensions).
#2055 and #2063 have now landed on main (which resolves the earlier linux-gpu-tools failure without glslangValidator), and this branch still merges cleanly. Feel free to mark this ready for review whenever you're ready (optionally updating the PR title/body to mention the configure-time file(MAKE_DIRECTORY ...) addition as well).
AI-assisted review.
Claimed in the coordination issue as: #1608 (comment)
What and why
Since
ba626820e, a fresh macOS or Linux build of the runtime can fail at a rule that writes intogenerated/:glslangValidatorwrites${CMAKE_CURRENT_BINARY_DIR}/generated/cs_null_descriptors.spv(orcs_bindless_dimensions.spv), but nothing has createdgenerated/when that rule runs, so it stops with "ERROR: Failed to open file" and the targets and ctest runs after it fail too.Two changes, both in
runtime/CMakeLists.txt:file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated)right afterinclude(CTest), so the folder exists at configure time, before any rule runs, whatever order-jpicks.cs_null_descriptors.spvrule also runs${CMAKE_COMMAND} -E make_directoryfirst, as the other rule writing togenerated/does.Tested
On an Apple M3 (macOS 26.5.1, CMake 4.5.1, Homebrew glslangValidator), from an empty build directory:
maindb1a22d29, before:cmake --build ... --target vk_null_descriptor_testfails with "Failed to open file"; after: it builds,ctest -R vk_null_descriptorpasses, and the whole build plusctestgive 96/96 passed.main1a441d336(one with vk_bindless_dimensions_test: size the set as the device does on MoltenVK (TEST-BINDLESS-DIMENSIONS-MOLTENVK) #2441, one with rdna2spirv: --explicit-lod-bias applies the S# LOD bias where MoltenVK drops the sampler's; ps_ssharp passes on Macs (SHADER-EXPLICIT-LOD-BIAS-MVK) #1774 merged in, neither touching CMake) stopped with "Failed to open file", one atgenerated/cs_bindless_dimensions.spv, the other at bothcs_bindless_dimensions.spvandcs_null_descriptors.spv(MEASURED, 2 builds).main02f71ccfemerged into this branch, after:generated/exists right after configure,vk_null_descriptor_testandvk_bindless_dimensions_testbuild from an empty directory, andctest -R '^vk_null_descriptor$'passes (MEASURED, 1 run).c94bc3003(cmake: generated/ exists at configure time and before vk_null_descriptor_test's rule; no "Failed to open file" on a fresh build (BUILD-NULL-DESCRIPTOR-GENERATED-DIR) #2096 (review)), 2/2.GPUs tested: Apple M3 (MoltenVK 1.4.2), for
vk_null_descriptoronlyAI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.🤖 Generated with Claude Code
Red checks: from
main, not this changeThe failing jobs (
check,macos-python,stdlib-tests-linux,linux-gpu-tools,macos,windows) fail the same way onmaind48a957bb(MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them:maintest_docs_cli_flagstest_make_game_preflight,test_progress_dashboard(repository URL)test_docs_repo_pathsmain, a merge is onTauwni:fix/2552-merge-main, correction)test_tool_stdout_encodingTauwni:fix/stdout-replace-two-new-scripts(no PR, open PR limit)test_windows_boot_journal_seedtest_docs_python_depstest_build_runtime_fallbackvk_bindless_dimensions(macOS)test_docs_env_varstest_make_game_pipelines,test_sampler_source_census,test_spirv_metal_set0_cli_errors,test_spirv_metal_set0_extra,tests/semantic/test_valu_cvt_f16_int16_mods.py,ps_exp_f32_denorm_rt(macOS)Tauwni/leonida, no PR (finding)cs_imgatomic_ext(macOS, linux-gpu-tools)vk_xdxr_postbuild_readback(Windows)main: mergemainNot checked by a second agent or human yet.