Crate spirv_to_dxil
source ·Expand description
Rust bindings for spirv-to-dxil.
For the lower-level C interface, see the spirv-to-dxil-sys crate.
§Push Constant Buffers
SPIR-V shaders that use Push Constants must choose register assignments that correspond with the Root Descriptor that the compiled shader will use for a constant buffer to store push constants with PushConstantBufferConfig.
§Runtime Data
For some vertex and compute shaders, a constant buffer provided at runtime is required to be bound.
You can check if the compiled shader requires runtime data with
DxilObject::requires_runtime_data
.
If your shader requires runtime data, then register assignments must be chosen in RuntimeDataBufferConfig.
See the runtime
module for how to construct the expected runtime data to be bound in a constant buffer.
Modules§
- Higher level helpers for runtime data.
Structs§
- A compiled DXIL artifact.
- Configuration options for SPIR-V YZ flip mode.
- The flip mode to use when compiling the shader.
- Configuration options for the push constant buffer if required
- Runtime configuration options for the SPIR-V compilation.
- Configuration options for the runtime data constant buffer if required.
- SPIR-V specialization constant definition.
Enums§
- The value of a SPIR-V specialization constant.
- The DXIL shader model to target.
- The shader stage of the input.
- Error type for spirv-to-dxil.
- The validator version to target. Requires
dxil.dll
in path.
Constants§
Functions§
- Dump the parsed NIR output of the SPIR-V to stdout.
- Compile SPIR-V words to a DXIL blob.