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 dedicated(self, value: bool) -> Self
pub fn 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_read(self, value: bool) -> Self
pub fn host_read(self, value: bool) -> Self
Specifies a buffer whose memory is host visible and may be mapped.
Memory optimal for CPU readback of data may be used.
Sourcepub fn host_write(self, value: bool) -> Self
pub fn host_write(self, value: bool) -> Self
Specifies a buffer whose memory is host visible and may be mapped.
Memory optimal for uploading data to the GPU and potentially for constant buffers may be used.
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 of specifying allowed usages of the buffer.
Source§impl BufferInfoBuilder
impl BufferInfoBuilder
Sourcepub fn build(self) -> BufferInfo
pub fn build(self) -> BufferInfo
Builds a new BufferInfo.
§Panics
If any of the following values have not been set this function will panic:
size
If alignment is not a power to two 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