pub struct BufferInfoBuilder { /* private fields */ }Expand description
Builder for BufferInfo.
Implementations§
Source§impl BufferInfoBuilder
impl BufferInfoBuilder
Sourcepub fn alignment(self, value: DeviceSize) -> Self
pub fn alignment(self, value: DeviceSize) -> Self
Byte alignment of the base device address of the buffer.
Must be a power of two.
Sourcepub fn alloc_dedicated(self, value: bool) -> Self
pub fn alloc_dedicated(self, value: bool) -> Self
Specifies a dedicated memory allocation managed by the Vulkan driver and not by the internal memory allocation pool transient resources share.
The driver may optimize access to dedicated buffers.
Sourcepub fn host_readable(self, value: bool) -> Self
pub fn host_readable(self, value: bool) -> Self
Specifies a buffer whose memory is host-visible and may be mapped for reads.
Memory optimal for CPU readback of data may be used.
Sourcepub fn host_writable(self, value: bool) -> Self
pub fn host_writable(self, value: bool) -> Self
Specifies a buffer whose memory is host-visible and may be mapped for writes.
Memory optimal for uploading data to the GPU and potentially for constant buffers may be used.
Sourcepub fn sharing_mode(self, value: SharingMode) -> Self
pub fn sharing_mode(self, value: SharingMode) -> Self
Controls whether the buffer is accessible from a single queue family (EXCLUSIVE) or
from all queues (CONCURRENT).
Sourcepub fn size(self, value: DeviceSize) -> Self
pub fn size(self, value: DeviceSize) -> Self
Size in bytes of the buffer to be created.
Sourcepub fn usage(self, value: BufferUsageFlags) -> Self
pub fn usage(self, value: BufferUsageFlags) -> Self
A bitmask specifying the allowed usages of the buffer.
Source§impl BufferInfoBuilder
impl BufferInfoBuilder
Sourcepub fn build(self) -> BufferInfo
pub fn build(self) -> BufferInfo
Builds a new BufferInfo.
If alignment is not a power of two and the checked feature is active this function will
panic.
Trait Implementations§
Source§impl Clone for BufferInfoBuilder
impl Clone for BufferInfoBuilder
Source§fn clone(&self) -> BufferInfoBuilder
fn clone(&self) -> BufferInfoBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more