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§
- runtime
- Higher level helpers for runtime data.
Structs§
- Dxil
Object - A compiled DXIL artifact.
- Flip
Config - Configuration options for SPIR-V YZ flip mode.
- Flip
Mode - The flip mode to use when compiling the shader.
- Push
Constant Buffer Config - Configuration options for the push constant buffer if required
- Runtime
Config - Runtime configuration options for the SPIR-V compilation.
- Runtime
Data Buffer Config - Configuration options for the runtime data constant buffer if required.
- Specialization
- SPIR-V specialization constant definition.
Enums§
- Const
Value - The value of a SPIR-V specialization constant.
- Shader
Model - The DXIL shader model to target.
- Shader
Stage - The shader stage of the input.
- Spirv
ToDxil Error - Error type for spirv-to-dxil.
- Validator
Version - The validator version to target. Requires
dxil.dllin path.
Constants§
Functions§
- dump_
nir - Dump the parsed NIR output of the SPIR-V to stdout.
- spirv_
to_ dxil - Compile SPIR-V words to a DXIL blob.