#[non_exhaustive]pub enum ImageLayoutType {
Optimal,
General,
}Expand description
Specifies which type of layout an image resource is accessed in.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Optimal
The image is accessed in an optimal layout. This is what you should be using most of the time.
The optimal layout depends on the access type. For instance, for color attachment output,
the only valid optimal layout is ColorAttachmentOptimal. For transfer sources, it’s
TransferSrcOptimal, and so on. Some access types don’t have an optimal layout for them.
In such cases, using this option makes no difference, as the general layout will
always be used.
General
The image is accessed in the general layout. This layout may be less efficient to access on some hardware than an optimal layout. However, you may still want to use it in certain cases if you want to minimize the number of layout transitions.
Implementations§
Source§impl ImageLayoutType
impl ImageLayoutType
Sourcepub const fn is_optimal(self) -> bool
pub const fn is_optimal(self) -> bool
Returns true if the layout type is Optimal.
Sourcepub const fn is_general(self) -> bool
pub const fn is_general(self) -> bool
Returns true if the layout type is General.
Trait Implementations§
Source§impl Clone for ImageLayoutType
impl Clone for ImageLayoutType
Source§fn clone(&self) -> ImageLayoutType
fn clone(&self) -> ImageLayoutType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ImageLayoutType
Source§impl Debug for ImageLayoutType
impl Debug for ImageLayoutType
impl Eq for ImageLayoutType
Source§impl Hash for ImageLayoutType
impl Hash for ImageLayoutType
Source§impl PartialEq for ImageLayoutType
impl PartialEq for ImageLayoutType
Source§fn eq(&self, other: &ImageLayoutType) -> bool
fn eq(&self, other: &ImageLayoutType) -> bool
self and other values to be equal, and is used by ==.