Struct sierra::SparseDescriptorsInstance
source · pub struct SparseDescriptorsInstance<T: DescriptorKind> { /* private fields */ }
Expand description
Descriptor instance with sparsely located resources.
Implementations§
source§impl<T> SparseDescriptorsInstance<T>where
T: DescriptorKind,
impl<T> SparseDescriptorsInstance<T>where
T: DescriptorKind,
sourcepub fn new(cap: u32, layout: DescriptorSetLayout) -> Self
pub fn new(cap: u32, layout: DescriptorSetLayout) -> Self
Returns new empty instance of SparseDescriptorsInstance
.
sourcepub fn get_or_insert(&mut self, descriptor: T::Descriptor) -> u32where
T::Descriptor: Hash + Clone + Eq,
pub fn get_or_insert(&mut self, descriptor: T::Descriptor) -> u32where
T::Descriptor: Hash + Clone + Eq,
Returns index for specified resource inside this array. Inserts resource if not in array yet.
Panics
pub fn remove(&mut self, descriptor: T::Descriptor) -> boolwhere
T::Descriptor: Hash + Eq,
pub fn update(
&mut self,
device: &Device
) -> Result<&SparseDescriptorSet, DescriptorsAllocationError>
Trait Implementations§
source§impl<T: Debug + DescriptorKind> Debug for SparseDescriptorsInstance<T>where
T::Descriptor: Debug,
impl<T: Debug + DescriptorKind> Debug for SparseDescriptorsInstance<T>where
T::Descriptor: Debug,
source§impl<T, const CAP: u32, const STAGES: u32> DescriptorsInstance<SparseDescriptors<T, CAP, STAGES>> for SparseDescriptorsInstance<T>where
T: DescriptorKind,
impl<T, const CAP: u32, const STAGES: u32> DescriptorsInstance<SparseDescriptors<T, CAP, STAGES>> for SparseDescriptorsInstance<T>where
T: DescriptorKind,
type Updated = SparseDescriptorSet
source§fn update(
&mut self,
_input: &SparseDescriptors<T, CAP, STAGES>,
device: &Device,
_encoder: &mut Encoder<'_>
) -> Result<&SparseDescriptorSet, DescriptorsAllocationError>
fn update(
&mut self,
_input: &SparseDescriptors<T, CAP, STAGES>,
device: &Device,
_encoder: &mut Encoder<'_>
) -> Result<&SparseDescriptorSet, DescriptorsAllocationError>
Performs necessary updates to the descriptors according to the input.
Returns update descriptors instance that can be bound to the encoder with correct pipline.