pub struct ImageCreateFlags(/* private fields */);Expand description
Flags specifying additional properties of an image.
Implementations§
Source§impl ImageCreateFlags
impl ImageCreateFlags
Sourcepub const SPARSE_BINDING: Self
pub const SPARSE_BINDING: Self
The image will be backed by sparse memory binding (through the bind_sparse queue
command) instead of regular binding (through bind_memory).
The sparse_binding feature must be enabled on the device.
Sourcepub const SPARSE_RESIDENCY: Self
pub const SPARSE_RESIDENCY: Self
The image can be used without being fully resident in memory at the time of use. It also allows non-opaque sparse binding operations, using the dimensions of the image, to be performed.
This requires the ImageCreateFlags::SPARSE_BINDING flag as well.
Depending on the image type, either the sparse_residency_image2_d or the
[sparse_residency_image3_d] feature must be enabled on the device.
For a multisampled image, the one of the features sparse_residency2_samples,
sparse_residency4_samples, sparse_residency8_samples or
sparse_residency16_samples, corresponding to the sample count of the image, must
be enabled on the device.
Sourcepub const MUTABLE_FORMAT: Self
pub const MUTABLE_FORMAT: Self
For non-multi-planar formats, whether an image view wrapping the image can have a different format.
For multi-planar formats, whether an image view wrapping the image can be created from a single plane of the image.
Sourcepub const CUBE_COMPATIBLE: Self
pub const CUBE_COMPATIBLE: Self
For 2D images, whether an image view of type ImageViewType::Cube or
ImageViewType::CubeArray can be created from the image.
Sourcepub const DIM2D_ARRAY_COMPATIBLE: Self
pub const DIM2D_ARRAY_COMPATIBLE: Self
For 3D images, whether an image view of type ImageViewType::Dim2d or
ImageViewType::Dim2dArray can be created from the image.
2D image views created from 3D images with this flag cannot be written to a
descriptor set and accessed in shaders, but can be used as a framebuffer attachment.
To write such an image view to a descriptor set, use the DIM2D_VIEW_COMPATIBLE flag.
On portability subset devices, the image_view2_d_on3_d_image feature must be enabled
on the device.
Sourcepub const BLOCK_TEXEL_VIEW_COMPATIBLE: Self
pub const BLOCK_TEXEL_VIEW_COMPATIBLE: Self
For images with a compressed format, whether an image view with an uncompressed format can be created from the image, where each texel in the view will correspond to a compressed texel block in the image.
Requires MUTABLE_FORMAT.
Sourcepub const EXTENDED_USAGE: Self
pub const EXTENDED_USAGE: Self
If MUTABLE_FORMAT is also enabled, allows specifying a usage for the image that is not
supported by the format of the image, as long as there is a format that does support the
usage, that an image view created from the image can have.
Sourcepub const DISJOINT: Self
pub const DISJOINT: Self
For images with a multi-planar format, whether each plane will have its memory bound separately, rather than having a single memory binding for the whole image.
Sourcepub const DIM2D_VIEW_COMPATIBLE: Self
pub const DIM2D_VIEW_COMPATIBLE: Self
For 3D images, whether an image view of type ImageViewType::Dim2d
(but not ImageViewType::Dim2dArray) can be created from the image.
Unlike DIM2D_ARRAY_COMPATIBLE, 2D image views created from 3D images with this flag
can be written to a descriptor set and accessed in shaders. To do this,
a feature must also be enabled, depending on the descriptor type:
image2_d_view_of3_dfor storage images.sampler2_d_view_of3_dfor sampled images.
Sourcepub const fn intersects(self, other: Self) -> bool
pub const fn intersects(self, other: Self) -> bool
Returns whether any flags are set in both self and other.
Sourcepub const fn contains(self, other: Self) -> bool
pub const fn contains(self, other: Self) -> bool
Returns whether all flags in other are set in self.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection of self and other.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
Returns self without the flags set in other.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the flags that are set in self or other, but not in both.
Trait Implementations§
Source§impl BitAnd for ImageCreateFlags
impl BitAnd for ImageCreateFlags
Source§impl BitAndAssign for ImageCreateFlags
impl BitAndAssign for ImageCreateFlags
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitOr for ImageCreateFlags
impl BitOr for ImageCreateFlags
Source§impl BitOrAssign for ImageCreateFlags
impl BitOrAssign for ImageCreateFlags
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitXor for ImageCreateFlags
impl BitXor for ImageCreateFlags
Source§impl BitXorAssign for ImageCreateFlags
impl BitXorAssign for ImageCreateFlags
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl Clone for ImageCreateFlags
impl Clone for ImageCreateFlags
Source§fn clone(&self) -> ImageCreateFlags
fn clone(&self) -> ImageCreateFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ImageCreateFlags
impl Debug for ImageCreateFlags
Source§impl Default for ImageCreateFlags
impl Default for ImageCreateFlags
Source§impl From<ImageCreateFlags> for ImageCreateFlags
impl From<ImageCreateFlags> for ImageCreateFlags
Source§fn from(val: ImageCreateFlags) -> Self
fn from(val: ImageCreateFlags) -> Self
Source§impl From<ImageCreateFlags> for ImageCreateFlags
impl From<ImageCreateFlags> for ImageCreateFlags
Source§fn from(val: ImageCreateFlags) -> Self
fn from(val: ImageCreateFlags) -> Self
Source§impl From<SwapchainCreateFlags> for ImageCreateFlags
impl From<SwapchainCreateFlags> for ImageCreateFlags
Source§fn from(flags: SwapchainCreateFlags) -> Self
fn from(flags: SwapchainCreateFlags) -> Self
Source§impl Hash for ImageCreateFlags
impl Hash for ImageCreateFlags
Source§impl PartialEq for ImageCreateFlags
impl PartialEq for ImageCreateFlags
Source§impl Sub for ImageCreateFlags
impl Sub for ImageCreateFlags
Source§impl SubAssign for ImageCreateFlags
impl SubAssign for ImageCreateFlags
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read more