Trait sierra::DescriptorBindingArray
source · pub trait DescriptorBindingArray<K> {
type DescriptorArray;
const COUNT: u32;
const FLAGS: DescriptorBindingFlags;
fn is_compatible(&self, descriptors: &Self::DescriptorArray) -> bool;
fn get_descriptors(
&self,
device: &Device
) -> Result<Self::DescriptorArray, OutOfMemory>;
fn update_descriptors(
&mut self,
device: &Device,
encoder: &mut Encoder<'_>,
descriptors: &Self::DescriptorArray
) -> Result<(), OutOfMemory> { ... }
}
Expand description
Trait for all types that can be used as a descriptor array.
Required Associated Types§
sourcetype DescriptorArray
type DescriptorArray
Descriptors value.
Required Associated Constants§
sourceconst FLAGS: DescriptorBindingFlags
const FLAGS: DescriptorBindingFlags
Flags necessary for this binding type.
Required Methods§
sourcefn is_compatible(&self, descriptors: &Self::DescriptorArray) -> bool
fn is_compatible(&self, descriptors: &Self::DescriptorArray) -> bool
Checks descriptors bound to a set.
Returns true
if bound descriptors are compatible with input.
Returns false
if new descriptors should be bound.
sourcefn get_descriptors(
&self,
device: &Device
) -> Result<Self::DescriptorArray, OutOfMemory>
fn get_descriptors(
&self,
device: &Device
) -> Result<Self::DescriptorArray, OutOfMemory>
Returns Descriptors
equivalent to self.
Provided Methods§
sourcefn update_descriptors(
&mut self,
device: &Device,
encoder: &mut Encoder<'_>,
descriptors: &Self::DescriptorArray
) -> Result<(), OutOfMemory>
fn update_descriptors(
&mut self,
device: &Device,
encoder: &mut Encoder<'_>,
descriptors: &Self::DescriptorArray
) -> Result<(), OutOfMemory>
Updates content of descriptors.