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§

Enums§

Constants§

Functions§

  • Dump the parsed NIR output of the SPIR-V to stdout.
  • Compile SPIR-V words to a DXIL blob.