Struct vulkano::memory::MemoryPropertyFlags
source · [−]pub struct MemoryPropertyFlags {
pub device_local: bool,
pub host_visible: bool,
pub host_coherent: bool,
pub host_cached: bool,
pub lazily_allocated: bool,
pub protected: bool,
pub _ne: NonExhaustive,
}
Expand description
Properties of a memory type.
Fields
device_local: bool
The memory is located on the device. This usually means that it’s efficient for the device to access this memory.
host_visible: bool
The memory can be accessed by the host.
host_coherent: bool
Modifications made by the host or the device on this memory type are instantaneously visible to the other party. If memory does not have this flag, changes to the memory are not visible until they are flushed or invalidated.
host_cached: bool
The memory is cached by the host. Host memory accesses to cached memory are faster than for uncached memory, but the cache may not be coherent.
lazily_allocated: bool
Allocations made from this memory type are lazy.
This means that no actual allocation is performed. Instead memory is automatically allocated by the Vulkan implementation based on need.
Memory of this type can only be used on images created with a certain flag. Memory of this type is never host-visible.
protected: bool
The memory can only be accessed by the device, and allows protected queue access.
Memory of this type is never host visible, host coherent or host cached.
_ne: NonExhaustive
Implementations
sourceimpl MemoryPropertyFlags
impl MemoryPropertyFlags
sourcepub const fn none() -> Self
👎Deprecated since 0.31.0: Use empty
instead.
pub const fn none() -> Self
Use empty
instead.
Returns a MemoryPropertyFlags
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 set in self
or other
, but not both.
Trait Implementations
sourceimpl BitAnd<MemoryPropertyFlags> for MemoryPropertyFlags
impl BitAnd<MemoryPropertyFlags> for MemoryPropertyFlags
type Output = MemoryPropertyFlags
type Output = MemoryPropertyFlags
&
operator.sourceimpl BitAndAssign<MemoryPropertyFlags> for MemoryPropertyFlags
impl BitAndAssign<MemoryPropertyFlags> for MemoryPropertyFlags
sourcefn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&=
operation. Read moresourceimpl BitOr<MemoryPropertyFlags> for MemoryPropertyFlags
impl BitOr<MemoryPropertyFlags> for MemoryPropertyFlags
type Output = MemoryPropertyFlags
type Output = MemoryPropertyFlags
|
operator.sourceimpl BitOrAssign<MemoryPropertyFlags> for MemoryPropertyFlags
impl BitOrAssign<MemoryPropertyFlags> for MemoryPropertyFlags
sourcefn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moresourceimpl BitXor<MemoryPropertyFlags> for MemoryPropertyFlags
impl BitXor<MemoryPropertyFlags> for MemoryPropertyFlags
type Output = MemoryPropertyFlags
type Output = MemoryPropertyFlags
^
operator.sourceimpl BitXorAssign<MemoryPropertyFlags> for MemoryPropertyFlags
impl BitXorAssign<MemoryPropertyFlags> for MemoryPropertyFlags
sourcefn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^=
operation. Read moresourceimpl Clone for MemoryPropertyFlags
impl Clone for MemoryPropertyFlags
sourcefn clone(&self) -> MemoryPropertyFlags
fn clone(&self) -> MemoryPropertyFlags
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for MemoryPropertyFlags
impl Debug for MemoryPropertyFlags
sourceimpl Default for MemoryPropertyFlags
impl Default for MemoryPropertyFlags
sourceimpl From<MemoryPropertyFlags> for MemoryPropertyFlags
impl From<MemoryPropertyFlags> for MemoryPropertyFlags
sourcefn from(val: MemoryPropertyFlags) -> Self
fn from(val: MemoryPropertyFlags) -> Self
sourceimpl From<MemoryPropertyFlags> for MemoryPropertyFlags
impl From<MemoryPropertyFlags> for MemoryPropertyFlags
sourcefn from(val: MemoryPropertyFlags) -> Self
fn from(val: MemoryPropertyFlags) -> Self
sourceimpl Hash for MemoryPropertyFlags
impl Hash for MemoryPropertyFlags
sourceimpl PartialEq<MemoryPropertyFlags> for MemoryPropertyFlags
impl PartialEq<MemoryPropertyFlags> for MemoryPropertyFlags
sourcefn eq(&self, other: &MemoryPropertyFlags) -> bool
fn eq(&self, other: &MemoryPropertyFlags) -> bool
sourceimpl Sub<MemoryPropertyFlags> for MemoryPropertyFlags
impl Sub<MemoryPropertyFlags> for MemoryPropertyFlags
type Output = MemoryPropertyFlags
type Output = MemoryPropertyFlags
-
operator.sourceimpl SubAssign<MemoryPropertyFlags> for MemoryPropertyFlags
impl SubAssign<MemoryPropertyFlags> for MemoryPropertyFlags
sourcefn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-=
operation. Read more