Struct gfx_hal::pso::SpecializationConstant
source · Expand description
Specialization constant for pipelines.
Specialization constants allow for easy configuration of multiple similar pipelines. For example, there may be a boolean exposed to the shader that switches the specularity on/off provided via a specialization constant. That would produce separate PSO’s for the “on” and “off” states but they share most of the internal stuff and are fast to produce. More importantly, they are fast to execute, since the driver can optimize out the branch on that other PSO creation.
Fields
id: u32
Constant identifier in shader source.
range: Range<u16>
Value to override specialization constant.
Trait Implementations
sourceimpl Clone for SpecializationConstant
impl Clone for SpecializationConstant
sourcefn clone(&self) -> SpecializationConstant
fn clone(&self) -> SpecializationConstant
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for SpecializationConstant
impl Send for SpecializationConstant
impl Sync for SpecializationConstant
impl Unpin for SpecializationConstant
impl UnwindSafe for SpecializationConstant
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more