Struct vulkano::image::ImageUsage
source · pub struct ImageUsage(/* private fields */);
Expand description
Describes how an image is going to be used. This is not just an optimization.
If you try to use an image in a way that you didn’t declare, an error will occur.
Implementations§
source§impl ImageUsage
impl ImageUsage
sourcepub const TRANSFER_SRC: Self = _
pub const TRANSFER_SRC: Self = _
The image can be used as a source for transfer, blit, resolve and clear commands.
sourcepub const TRANSFER_DST: Self = _
pub const TRANSFER_DST: Self = _
The image can be used as a destination for transfer, blit, resolve and clear commands.
sourcepub const COLOR_ATTACHMENT: Self = _
pub const COLOR_ATTACHMENT: Self = _
The image can be used as a color attachment in a render pass/framebuffer.
sourcepub const DEPTH_STENCIL_ATTACHMENT: Self = _
pub const DEPTH_STENCIL_ATTACHMENT: Self = _
The image can be used as a depth/stencil attachment in a render pass/framebuffer.
sourcepub const TRANSIENT_ATTACHMENT: Self = _
pub const TRANSIENT_ATTACHMENT: Self = _
The image will be used as an attachment, and will only ever be used temporarily. As soon as you leave a render pass, the content of transient images becomes undefined.
This is a hint to the Vulkan implementation that it may not need allocate any memory for this image if the image can live entirely in some cache.
If transient_attachment
is true, then only color_attachment
, depth_stencil_attachment
and input_attachment
can be true as well. The rest must be false or an error will be
returned when creating the image.
sourcepub const INPUT_ATTACHMENT: Self = _
pub const INPUT_ATTACHMENT: Self = _
The image can be used as an input attachment in a render pass/framebuffer.
sourcepub const fn none() -> Self
👎Deprecated since 0.31.0: use empty
instead
pub const fn none() -> Self
empty
insteadReturns a ImageUsage
with none of the flags set.
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 ImageUsage
impl BitAnd for ImageUsage
source§impl BitAndAssign for ImageUsage
impl BitAndAssign for ImageUsage
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&=
operation. Read moresource§impl BitOr for ImageUsage
impl BitOr for ImageUsage
source§impl BitOrAssign for ImageUsage
impl BitOrAssign for ImageUsage
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moresource§impl BitXor for ImageUsage
impl BitXor for ImageUsage
source§impl BitXorAssign for ImageUsage
impl BitXorAssign for ImageUsage
source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^=
operation. Read moresource§impl Clone for ImageUsage
impl Clone for ImageUsage
source§fn clone(&self) -> ImageUsage
fn clone(&self) -> ImageUsage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ImageUsage
impl Debug for ImageUsage
source§impl Default for ImageUsage
impl Default for ImageUsage
source§impl From<ImageUsage> for ImageUsageFlags
impl From<ImageUsage> for ImageUsageFlags
source§fn from(val: ImageUsage) -> Self
fn from(val: ImageUsage) -> Self
source§impl From<ImageUsageFlags> for ImageUsage
impl From<ImageUsageFlags> for ImageUsage
source§fn from(val: ImageUsageFlags) -> Self
fn from(val: ImageUsageFlags) -> Self
source§impl Hash for ImageUsage
impl Hash for ImageUsage
source§impl PartialEq for ImageUsage
impl PartialEq for ImageUsage
source§fn eq(&self, other: &ImageUsage) -> bool
fn eq(&self, other: &ImageUsage) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Sub for ImageUsage
impl Sub for ImageUsage
source§impl SubAssign for ImageUsage
impl SubAssign for ImageUsage
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-=
operation. Read more