pub enum SpirVType {
Show 14 variants
Void,
Bool,
Int {
width: u32,
signed: bool,
},
Float {
width: u32,
},
Vector {
element: Box<SpirVType>,
count: u32,
},
Matrix {
column_type: Box<SpirVType>,
column_count: u32,
},
Array {
element: Box<SpirVType>,
length: u32,
},
RuntimeArray(Box<SpirVType>),
Struct(Vec<SpirVType>),
Pointer {
storage_class: StorageClass,
pointee: Box<SpirVType>,
},
Function {
return_type: Box<SpirVType>,
param_types: Vec<SpirVType>,
},
Image {
sampled_type: Box<SpirVType>,
dim: ImageDim,
depth: u32,
arrayed: u32,
ms: u32,
sampled: u32,
format: ImageFormat,
},
Sampler,
SampledImage(Box<SpirVType>),
}Expand description
SPIR-V type system.
Each type variant corresponds to one or more SPIR-V OpType* instructions.
Variants§
Void
OpTypeVoid — no value
Bool
OpTypeBool — true/false
Int
OpTypeInt — signed/unsigned integer, width in bits
Float
OpTypeFloat — IEEE floating-point, width in bits (16, 32, 64)
Vector
OpTypeVector — fixed-length homogeneous vector
Fields
Matrix
OpTypeMatrix — column-major matrix of vectors
Fields
Array
OpTypeArray — fixed-length array
RuntimeArray(Box<SpirVType>)
OpTypeRuntimeArray — runtime-length array (descriptor binding)
Struct(Vec<SpirVType>)
OpTypeStruct — aggregate of named/indexed members
Pointer
OpTypePointer — typed pointer with storage class
Fields
storage_class: StorageClassStorage class (e.g., Uniform, Input, Output, Function)
Function
OpTypeFunction — function signature
Image
OpTypeImage — image type for sampling/storage
Fields
format: ImageFormatImage format
Sampler
OpTypeSampler — opaque sampler type
SampledImage(Box<SpirVType>)
OpTypeSampledImage — combined image+sampler