Struct spirq::reflect_cfg::ReflectConfig
source · pub struct ReflectConfig { /* private fields */ }
Expand description
Reflection configuration builder.
Implementations§
source§impl ReflectConfig
impl ReflectConfig
pub fn new() -> Self
sourcepub fn spv<Spv: Into<SpirvBinary>>(&mut self, x: Spv) -> &mut Self
pub fn spv<Spv: Into<SpirvBinary>>(&mut self, x: Spv) -> &mut Self
SPIR-V binary to be reflected.
sourcepub fn ref_all_rscs(&mut self, x: bool) -> &mut Self
pub fn ref_all_rscs(&mut self, x: bool) -> &mut Self
Reference all defined resources even the resource is not used by an entry point. Otherwise and by default, only the referenced resources are assigned to entry points.
Can be faster for modules with only entry point; slower for multiple entry points.
sourcepub fn combine_img_samplers(&mut self, x: bool) -> &mut Self
pub fn combine_img_samplers(&mut self, x: bool) -> &mut Self
Combine images and samplers sharing a same binding point to combined image sampler descriptors.
Faster when disabled, but useful for modules derived from HLSL.
sourcepub fn gen_unique_names(&mut self, x: bool) -> &mut Self
pub fn gen_unique_names(&mut self, x: bool) -> &mut Self
Generate unique names for types and struct fields to help further processing of the reflection data. Otherwise, the debug names are assigned.
sourcepub fn specialize(&mut self, spec_id: SpecId, value: ConstantValue) -> &mut Self
pub fn specialize(&mut self, spec_id: SpecId, value: ConstantValue) -> &mut Self
Use the provided value for specialization constant at spec_id
.
sourcepub fn reflect(&mut self) -> Result<Vec<EntryPoint>>
pub fn reflect(&mut self) -> Result<Vec<EntryPoint>>
Reflect the SPIR-V binary and extract all entry points.
sourcepub fn reflect_inspect<I: Inspector>(
&mut self,
inspector: &mut I
) -> Result<Vec<EntryPoint>>
pub fn reflect_inspect<I: Inspector>( &mut self, inspector: &mut I ) -> Result<Vec<EntryPoint>>
Reflect the SPIR-V binary and extract all entry points with an inspector for customized reflection subroutines.
sourcepub fn reflect_inspect_by<F: FnMut(&mut ReflectIntermediate<'_>, &Instr)>(
&mut self,
inspector: F
) -> Result<Vec<EntryPoint>>
pub fn reflect_inspect_by<F: FnMut(&mut ReflectIntermediate<'_>, &Instr)>( &mut self, inspector: F ) -> Result<Vec<EntryPoint>>
Reflect the SPIR-V binary and extract all entry points with an inspector function for customized reflection subroutines.
Trait Implementations§
source§impl Clone for ReflectConfig
impl Clone for ReflectConfig
source§fn clone(&self) -> ReflectConfig
fn clone(&self) -> ReflectConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more