Struct vulkano::buffer::sys::UnsafeBuffer
[−]
[src]
pub struct UnsafeBuffer { /* fields omitted */ }
Data storage in a GPU-accessible location.
Methods
impl UnsafeBuffer
[src]
unsafe fn new<'a, I>(
device: Arc<Device>,
size: usize,
usage: BufferUsage,
sharing: Sharing<I>,
sparse: SparseLevel
) -> Result<(UnsafeBuffer, MemoryRequirements), BufferCreationError> where
I: Iterator<Item = u32>,
device: Arc<Device>,
size: usize,
usage: BufferUsage,
sharing: Sharing<I>,
sparse: SparseLevel
) -> Result<(UnsafeBuffer, MemoryRequirements), BufferCreationError> where
I: Iterator<Item = u32>,
Creates a new buffer of the given size.
See the module's documentation for information about safety.
Panic
Panics if sparse.sparse
is false and sparse.sparse_residency
or
sparse.sparse_aliased
is true.
unsafe fn bind_memory(
&self,
memory: &DeviceMemory,
offset: usize
) -> Result<(), OomError>
&self,
memory: &DeviceMemory,
offset: usize
) -> Result<(), OomError>
fn size(&self) -> usize
Returns the size of the buffer in bytes.
fn usage_transfer_source(&self) -> bool
fn usage_transfer_destination(&self) -> bool
fn usage_uniform_texel_buffer(&self) -> bool
fn usage_storage_texel_buffer(&self) -> bool
fn usage_uniform_buffer(&self) -> bool
fn usage_storage_buffer(&self) -> bool
fn usage_index_buffer(&self) -> bool
fn usage_vertex_buffer(&self) -> bool
fn usage_indirect_buffer(&self) -> bool
fn key(&self) -> u64
Returns a key unique to each UnsafeBuffer
. Can be used for the conflicts_key
method.
Trait Implementations
impl VulkanObject for UnsafeBuffer
[src]
type Object = Buffer
The type of the object.
fn internal_object(&self) -> Buffer
Returns a reference to the object.
impl DeviceOwned for UnsafeBuffer
[src]
impl Debug for UnsafeBuffer
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.