pub struct DescriptorRequirements {
    pub memory_read: ShaderStages,
    pub memory_write: ShaderStages,
    pub sampler_compare: bool,
    pub sampler_no_unnormalized_coordinates: bool,
    pub sampler_no_ycbcr_conversion: bool,
    pub sampler_with_images: HashSet<DescriptorIdentifier>,
    pub storage_image_atomic: bool,
}
Expand description

The requirements imposed by a shader on resources bound to a descriptor.

Fields§

§memory_read: ShaderStages

For buffers and images, which shader stages perform read operations.

§memory_write: ShaderStages

For buffers and images, which shader stages perform write operations.

§sampler_compare: bool

For sampler bindings, whether the shader performs depth comparison operations.

§sampler_no_unnormalized_coordinates: bool

For sampler bindings, whether the shader performs sampling operations that are not permitted with unnormalized coordinates. This includes sampling with ImplicitLod, Dref or Proj SPIR-V instructions or with an LOD bias or offset.

§sampler_no_ycbcr_conversion: bool

For sampler bindings, whether the shader performs sampling operations that are not permitted with a sampler YCbCr conversion. This includes sampling with Gather SPIR-V instructions or with an offset.

§sampler_with_images: HashSet<DescriptorIdentifier>

For sampler bindings, the sampled image descriptors that are used in combination with this sampler.

§storage_image_atomic: bool

For storage image bindings, whether the shader performs atomic operations.

Implementations§

source§

impl DescriptorRequirements

source

pub fn merge(&mut self, other: &Self)

Merges other into self, so that self satisfies the requirements of both.

Trait Implementations§

source§

impl Clone for DescriptorRequirements

source§

fn clone(&self) -> DescriptorRequirements

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 Debug for DescriptorRequirements

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DescriptorRequirements

source§

fn default() -> DescriptorRequirements

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

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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 Twhere 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 Twhere 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.