[][src]Struct vulkano::buffer::sys::UnsafeBuffer

pub struct UnsafeBuffer { /* fields omitted */ }

Data storage in a GPU-accessible location.


impl UnsafeBuffer[src]

pub 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>, 

Creates a new buffer of the given size.

See the module's documentation for information about safety.


  • Panics if sparse.sparse is false and sparse.sparse_residency or sparse.sparse_aliased is true.
  • Panics if usage is empty.

pub unsafe fn bind_memory(
    memory: &DeviceMemory,
    offset: usize
) -> Result<(), OomError>

pub fn size(&self) -> usize[src]

Returns the size of the buffer in bytes.

pub fn usage_transfer_source(&self) -> bool[src]

pub fn usage_transfer_destination(&self) -> bool[src]

pub fn usage_uniform_texel_buffer(&self) -> bool[src]

pub fn usage_storage_texel_buffer(&self) -> bool[src]

pub fn usage_uniform_buffer(&self) -> bool[src]

pub fn usage_storage_buffer(&self) -> bool[src]

pub fn usage_index_buffer(&self) -> bool[src]

pub fn usage_vertex_buffer(&self) -> bool[src]

pub fn usage_indirect_buffer(&self) -> bool[src]

pub fn key(&self) -> u64[src]

Returns a key unique to each UnsafeBuffer. Can be used for the conflicts_key method.

Trait Implementations

impl DeviceOwned for UnsafeBuffer[src]

impl VulkanObject for UnsafeBuffer[src]

type Object = Buffer

The type of the object.

impl Drop for UnsafeBuffer[src]

impl Debug for UnsafeBuffer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> DeviceOwned for T where
    T: Deref,
    <T as Deref>::Target: DeviceOwned

impl<T> Content for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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