Struct screen_13::driver::buffer::BufferInfo
source · #[non_exhaustive]pub struct BufferInfo {
pub alignment: DeviceSize,
pub mappable: bool,
pub size: DeviceSize,
pub usage: BufferUsageFlags,
}
Expand description
Information used to create a Buffer
instance.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.alignment: DeviceSize
Byte alignment of the base device address of the buffer.
Must be a power of two.
mappable: bool
Specifies a buffer whose memory is host visible and may be mapped.
size: DeviceSize
Size in bytes of the buffer to be created.
usage: BufferUsageFlags
A bitmask of specifying allowed usages of the buffer.
Implementations§
source§impl BufferInfo
impl BufferInfo
sourcepub const fn device_mem(size: DeviceSize, usage: BufferUsageFlags) -> BufferInfo
pub const fn device_mem(size: DeviceSize, usage: BufferUsageFlags) -> BufferInfo
Specifies a non-mappable buffer with the given size
and usage
values.
Device-local memory (located on the GPU) is used.
sourcepub const fn host_mem(size: DeviceSize, usage: BufferUsageFlags) -> BufferInfo
pub const fn host_mem(size: DeviceSize, usage: BufferUsageFlags) -> BufferInfo
Specifies a mappable buffer with the given size
and usage
values.
Host-local memory (located in CPU-accesible RAM) is used.
§Note
For convenience the given usage value will be bitwise OR’d with
TRANSFER_DST | TRANSFER_SRC
.
sourcepub fn to_builder(self) -> BufferInfoBuilder
pub fn to_builder(self) -> BufferInfoBuilder
Converts a BufferInfo
into a BufferInfoBuilder
.
Trait Implementations§
source§impl<T> Alias<BufferInfo, Buffer> for AliasPool<T>
impl<T> Alias<BufferInfo, Buffer> for AliasPool<T>
source§fn alias(&mut self, info: BufferInfo) -> Result<Arc<Lease<Buffer>>, DriverError>
fn alias(&mut self, info: BufferInfo) -> Result<Arc<Lease<Buffer>>, DriverError>
Aliases a resource.
source§impl Clone for BufferInfo
impl Clone for BufferInfo
source§fn clone(&self) -> BufferInfo
fn clone(&self) -> BufferInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BufferInfo
impl Debug for BufferInfo
source§impl From<BufferInfo> for BufferSubresource
impl From<BufferInfo> for BufferSubresource
source§fn from(info: BufferInfo) -> Self
fn from(info: BufferInfo) -> Self
Converts to this type from the input type.
source§impl From<BufferInfoBuilder> for BufferInfo
impl From<BufferInfoBuilder> for BufferInfo
source§fn from(info: BufferInfoBuilder) -> Self
fn from(info: BufferInfoBuilder) -> Self
Converts to this type from the input type.
source§impl Hash for BufferInfo
impl Hash for BufferInfo
source§impl PartialEq for BufferInfo
impl PartialEq for BufferInfo
source§fn eq(&self, other: &BufferInfo) -> bool
fn eq(&self, other: &BufferInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> Pool<BufferInfo, Buffer> for AliasPool<T>
impl<T> Pool<BufferInfo, Buffer> for AliasPool<T>
source§fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
Lease a resource.
source§impl Pool<BufferInfo, Buffer> for FifoPool
impl Pool<BufferInfo, Buffer> for FifoPool
source§fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
Lease a resource.
source§impl Pool<BufferInfo, Buffer> for HashPool
impl Pool<BufferInfo, Buffer> for HashPool
source§fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
Lease a resource.
source§impl Pool<BufferInfo, Buffer> for LazyPool
impl Pool<BufferInfo, Buffer> for LazyPool
source§fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
Lease a resource.
impl Copy for BufferInfo
impl Eq for BufferInfo
impl StructuralPartialEq for BufferInfo
Auto Trait Implementations§
impl RefUnwindSafe for BufferInfo
impl Send for BufferInfo
impl Sync for BufferInfo
impl Unpin for BufferInfo
impl UnwindSafe for BufferInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more