rspirv-ext
An extension to rspirv, adding builder methods for
several SPIR-V extensions. Uses a heavily stripped down and modified version of rspirv-autogen.
Documentation
In total rspirv-ext APIs contains:
- The SPIR-V extension headers (all extension structs, enums, and constants)
- A data representation of SPIR-V extension methods for the
rspirvbuilder - A structured representation of the debug extensions, automatically handling the conversion of all constant arguments to deduplicated
OpConstantandOpStringinstructions
The Khronos SPIR-V JSON grammar is leveraged to generate parts
of the source code using rspirv-autogen-ext.
Please see the links to docs.rs for detailed documentation.
Status
Only includes four of the extensions right now and mainly targets the Shader.DebugInfo.100 extension,
since it's a lot more complex than most.
Directory Organization
There are multiple crates inside this repo:
autogen/: Crate to generate various Rust code snippets used in the modules insrc/spirv/andsrc/dr/, from the extension's JSON grammar. If you are not modifyingsrc/spirv/orsrc/dr/, you don't need to care about this directory.src/: Therspirv-extcrate.
Build
If you just want to compile and use the rspirv-ext crate:
If you want to refresh the rspirv-ext crate with new code
snippets generated from SPIR-V's JSON grammar:
# Clone the SPIRV-Headers repo