Crate spirv_to_dxil

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§

runtime
Higher level helpers for runtime data.

Structs§

DxilObject
A compiled DXIL artifact.
FlipConfig
Configuration options for SPIR-V YZ flip mode.
FlipMode
The flip mode to use when compiling the shader.
PushConstantBufferConfig
Configuration options for the push constant buffer if required
RuntimeConfig
Runtime configuration options for the SPIR-V compilation.
RuntimeDataBufferConfig
Configuration options for the runtime data constant buffer if required.
Specialization
SPIR-V specialization constant definition.

Enums§

ConstValue
The value of a SPIR-V specialization constant.
ShaderModel
The DXIL shader model to target.
ShaderStage
The shader stage of the input.
SpirvToDxilError
Error type for spirv-to-dxil.
ValidatorVersion
The validator version to target. Requires dxil.dll in path.

Constants§

DXIL_SPIRV_MAX_VIEWPORT

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.