Implement manifest-driven shader pipeline with runtime library, hot-reload, and metadata - #10
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
backend/category/program/variant/stage, emits stage JSON andprogram.jsonmetadata, and stages outputs under<build>/bin/shaders/binand<build>/bin/shaders/metadata; seecmake/ShaderCompilation.cmakeandcmake/compile_shaders.cmakeandshaders/shaders.cmake.shaders/(sharedshaders/includes/,shaders/materials/,shaders/post/,shaders/debug/) and small example shaders and include files demonstrating conventions and predictable include resolution (*.sh,*.def.sc).ShaderProgramLibrary(engine/render/shader_library.{hpp,cpp}) withShaderProgramId, backend-aware path resolution, safeload_program, and timestamp-basedreload_if_stalehot-reload that preserves the prior program on failure.program.jsonwith stage list/refs), wired packaging/validation to require metadata, updatedrender_shellto useShaderProgramLibrary, and added a focused unit testtests/render/shader_pipeline_tests.cppvalidating path resolution and backend mapping.Testing
cmake -DRENDER_SOURCE_DIR=/workspace/render -DRENDER_SHADER_OUTPUT_ROOT=/tmp/render_shader_out -DRENDER_SHADER_MANIFEST=/workspace/render/shaders/shaders.cmake -DRENDER_BGFX_SHADERC= -DRENDER_REQUIRE_SHADER_COMPILATION=OFF -DRENDER_SHADER_BACKENDS=spirv -P cmake/compile_shaders.cmake, which ran and returned the expected warning path (skipped compilation) and successfully generated no-op logs.cmake --preset linux-debug -DRENDER_ALLOW_FETCHCONTENT=ON) to validate build/test integration, but it failed in this environment due to external network/FetchContent (SDL3) being blocked; this prevented running the full build and CTest in this sandbox.render_shader_pipeline_testsand wired it into the unit test suite (CTest) so CI can run the new path-resolution tests when dependencies and network/fetch are available; test compilation/run was not completed here because the full build could not finish in this environment.Codex Task