pub struct ReflectConfig { /* private fields */ }
Expand description

Reflection configuration builder.

Implementations§

source§

impl ReflectConfig

source

pub fn new() -> Self

source

pub fn spv<Spv: Into<SpirvBinary>>(&mut self, x: Spv) -> &mut Self

SPIR-V binary to be reflected.

source

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.

source

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.

source

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.

source

pub fn specialize(&mut self, spec_id: SpecId, value: ConstantValue) -> &mut Self

Use the provided value for specialization constant at spec_id.

source

pub fn reflect(&mut self) -> Result<Vec<EntryPoint>>

Reflect the SPIR-V binary and extract all entry points.

source

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.

source

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

source§

fn clone(&self) -> ReflectConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for ReflectConfig

source§

fn default() -> ReflectConfig

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.