Struct vulkano::buffer::BufferUsage
source · [−]pub struct BufferUsage {
pub transfer_src: bool,
pub transfer_dst: bool,
pub uniform_texel_buffer: bool,
pub storage_texel_buffer: bool,
pub uniform_buffer: bool,
pub storage_buffer: bool,
pub index_buffer: bool,
pub vertex_buffer: bool,
pub indirect_buffer: bool,
pub shader_device_address: bool,
pub _ne: NonExhaustive,
}
Expand description
Describes how a buffer is going to be used. This is not just an optimization.
If you try to use a buffer in a way that you didn’t declare, an error will be returned.
Fields
transfer_src: bool
The buffer can be used as a source for transfer, blit, resolve and clear commands.
transfer_dst: bool
The buffer can be used as a destination for transfer, blit, resolve and clear commands.
uniform_texel_buffer: bool
The buffer can be used as a uniform texel buffer in a descriptor set.
storage_texel_buffer: bool
The buffer can be used as a storage texel buffer in a descriptor set.
uniform_buffer: bool
The buffer can be used as a uniform buffer in a descriptor set.
storage_buffer: bool
The buffer can be used as a storage buffer in a descriptor set.
index_buffer: bool
The buffer can be used as an index buffer.
vertex_buffer: bool
The buffer can be used as a vertex or instance buffer.
indirect_buffer: bool
The buffer can be used as an indirect buffer.
shader_device_address: bool
The buffer’s device address can be retrieved.
_ne: NonExhaustive
Implementations
sourceimpl BufferUsage
impl BufferUsage
sourcepub const fn none() -> Self
👎Deprecated since 0.31.0: Use empty
instead.
pub const fn none() -> Self
Use empty
instead.
Returns a BufferUsage
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<BufferUsage> for BufferUsage
impl BitAnd<BufferUsage> for BufferUsage
type Output = BufferUsage
type Output = BufferUsage
&
operator.sourceimpl BitAndAssign<BufferUsage> for BufferUsage
impl BitAndAssign<BufferUsage> for BufferUsage
sourcefn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&=
operation. Read moresourceimpl BitOr<BufferUsage> for BufferUsage
impl BitOr<BufferUsage> for BufferUsage
type Output = BufferUsage
type Output = BufferUsage
|
operator.sourceimpl BitOrAssign<BufferUsage> for BufferUsage
impl BitOrAssign<BufferUsage> for BufferUsage
sourcefn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moresourceimpl BitXor<BufferUsage> for BufferUsage
impl BitXor<BufferUsage> for BufferUsage
type Output = BufferUsage
type Output = BufferUsage
^
operator.sourceimpl BitXorAssign<BufferUsage> for BufferUsage
impl BitXorAssign<BufferUsage> for BufferUsage
sourcefn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^=
operation. Read moresourceimpl Clone for BufferUsage
impl Clone for BufferUsage
sourcefn clone(&self) -> BufferUsage
fn clone(&self) -> BufferUsage
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for BufferUsage
impl Debug for BufferUsage
sourceimpl Default for BufferUsage
impl Default for BufferUsage
sourceimpl From<BufferUsage> for BufferUsageFlags
impl From<BufferUsage> for BufferUsageFlags
sourcefn from(val: BufferUsage) -> Self
fn from(val: BufferUsage) -> Self
sourceimpl From<BufferUsageFlags> for BufferUsage
impl From<BufferUsageFlags> for BufferUsage
sourcefn from(val: BufferUsageFlags) -> Self
fn from(val: BufferUsageFlags) -> Self
sourceimpl Hash for BufferUsage
impl Hash for BufferUsage
sourceimpl PartialEq<BufferUsage> for BufferUsage
impl PartialEq<BufferUsage> for BufferUsage
sourcefn eq(&self, other: &BufferUsage) -> bool
fn eq(&self, other: &BufferUsage) -> bool
sourceimpl Sub<BufferUsage> for BufferUsage
impl Sub<BufferUsage> for BufferUsage
type Output = BufferUsage
type Output = BufferUsage
-
operator.sourceimpl SubAssign<BufferUsage> for BufferUsage
impl SubAssign<BufferUsage> for BufferUsage
sourcefn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-=
operation. Read more