[][src]Struct bedrock::resources::BufferUsage

pub struct BufferUsage(pub VkBufferUsageFlags);

Bitmask specifying allowed usage of a buffer

Methods

impl BufferUsage[src]

pub const TRANSFER_SRC: Self[src]

Specifies that the buffer can be used as the source of a transfer command

pub const TRANSFER_DEST: Self[src]

Specifies that the buffer can be used as the destination of a transfer command

pub const UNIFORM_TEXEL_BUFFER: Self[src]

Specifies that the buffer can be used to create a BufferView suitable for occupying a DescriptorSet slot of type VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER

pub const STORAGE_TEXEL_BUFFER: Self[src]

Specifies that the buffer can be used to create a BufferView suitable for occupying a DescriptorSet slot of type VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER

pub const UNIFORM_BUFFER: Self[src]

Specifies that the buffer can be used in a DescriptorBufferInfo suitable for occupying a DescriptorSet slot either of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC

pub const STORAGE_BUFFER: Self[src]

Specifies that the buffer can be used in a DescriptorBufferInfo suitable for occupying a DescriptorSet slot either of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

pub const INDEX_BUFFER: Self[src]

Specifies that the buffer is suitable for passing as the buffer parameter to DrawCommandBuffer::bind_index_buffer

pub const VERTEX_BUFFER: Self[src]

Specifies that the buffer is suitable for passing as an element of the buffers array to DrawCommandBuffer::bind_vertex_buffers

pub const INDIRECT_BUFFER: Self[src]

Specifies that the buffer is suitable for passing as the buffer parameter to DrawCommandBuffer::draw_indirect, DrawCommandBuffer::draw_indexed_indirect, or ComputeCommandBuffer::dispatch_indirect

pub fn transfer_src(self) -> Self[src]

Specifies that the buffer can be used as the source of a transfer command

pub fn transfer_dest(self) -> Self[src]

Specifies that the buffer can be used as the destination of a transfer command

pub fn uniform_texel_buffer(self) -> Self[src]

Specifies that the buffer can be used to create a BufferView suitable for occupying a DescriptorSet slot of type VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER

pub fn storage_texel_buffer(self) -> Self[src]

Specifies that the buffer can be used to create a BufferView suitable for occupying a DescriptorSet slot of type VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER

pub fn uniform_buffer(self) -> Self[src]

Specifies that the buffer can be used in a DescriptorBufferInfo suitable for occupying a DescriptorSet slot either of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC

pub fn storage_buffer(self) -> Self[src]

Specifies that the buffer can be used in a DescriptorBufferInfo suitable for occupying a DescriptorSet slot either of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC

pub fn index_buffer(self) -> Self[src]

Specifies that the buffer is suitable for passing as the buffer parameter to DrawCommandBuffer::bind_index_buffer

pub fn vertex_buffer(self) -> Self[src]

Specifies that the buffer is suitable for passing as an element of the buffers array to DrawCommandBuffer::bind_vertex_buffers

pub fn indirect_buffer(self) -> Self[src]

Specifies that the buffer is suitable for passing as the buffer parameter to DrawCommandBuffer::draw_indirect, DrawCommandBuffer::draw_indexed_indirect, or ComputeCommandBuffer::dispatch_indirect

pub fn default_access_mask(self) -> VkAccessFlags[src]

Generates a default access type mask

pub fn is_uniform(self) -> bool[src]

Determines if flag contains usage of uniform-buffer

pub fn is_storage(self) -> bool[src]

Determines if flag contains usage of storage-buffer

Trait Implementations

impl BitOr<BufferUsage> for BufferUsage[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOrAssign<BufferUsage> for BufferUsage[src]

impl Clone for BufferUsage[src]

impl Copy for BufferUsage[src]

impl Debug for BufferUsage[src]

impl Eq for BufferUsage[src]

impl PartialEq<BufferUsage> for BufferUsage[src]

impl StructuralEq for BufferUsage[src]

impl StructuralPartialEq for BufferUsage[src]

Auto Trait Implementations

impl RefUnwindSafe for BufferUsage

impl Send for BufferUsage

impl Sync for BufferUsage

impl Unpin for BufferUsage

impl UnwindSafe for BufferUsage

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.