vulkan-utils-spirv: New package#647
Merged
Merged
Conversation
Compile-time generation of Haskell types and stuff using SPIR-v bytecode reflection. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The reflect examples and the vulkan-utils-spirv test suite consumed committed .spv files produced by out-of-band build-shaders.sh scripts, which broke CI on a fresh checkout (the .spv were gitignored, and two fixtures had no GLSL source at all). Shaders are now compiled at build time by the vulkan-utils GLSL quasiquoters and reflected from the embedded bytes; the scripts, shader files and file-embed dependency are gone. vulkan-utils-spirv gains the missing Bytes variants for the stage TH: reflectStageSigBytes and reflectPipelineLayoutSigBytes, mirroring reflectShaderTypesBytes. Each example is restructured around per-pipeline modules whose <Pipeline>.Shader submodule holds the quasiquoted SPIR-V (satisfying the TH stage restriction) and whose pipeline module reflects it and builds the pipeline; Main does the setup and Render the headless frame: * compute-reflect: Main, Render, Julia(.Shader) * mesh-reflect: Main, Render, Mesh(.Shader) * texture-reflect: Main, Render, Tri(.Shader), Cube(.Shader) * pathtrace-reflect: Main, Render, Scene, Pathtracer(.Shader) The pathtracer and bda shaders use compileShaderQ with a vulkan1.2 target (buffer_reference), wide.comp with vulkan1.1 (Int64). The sourceless julia.comp and tri.vert fixtures are reconstructed from the test suite's layout assertions, which pin them exactly. All four examples render correctly (mesh/texture self-checks pass) and the 75 vulkan-utils-spirv tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Compile-time generation of Haskell types and stuff using SPIR-v bytecode reflection.