Struct vulkano::buffer::sys::UnsafeBuffer
source · pub struct UnsafeBuffer { /* private fields */ }
Expand description
Data storage in a GPU-accessible location.
Implementations
sourceimpl UnsafeBuffer
impl UnsafeBuffer
sourcepub 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>,
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.
Panic
Panics if sparse.sparse
is false and sparse.sparse_residency
or
sparse.sparse_aliased
is true.
pub unsafe fn bind_memory(
&self,
memory: &DeviceMemory,
offset: usize
) -> Result<(), OomError>
pub fn usage_transfer_source(&self) -> bool
pub fn usage_transfer_destination(&self) -> bool
pub fn usage_uniform_texel_buffer(&self) -> bool
pub fn usage_storage_texel_buffer(&self) -> bool
pub fn usage_uniform_buffer(&self) -> bool
pub fn usage_storage_buffer(&self) -> bool
pub fn usage_index_buffer(&self) -> bool
pub fn usage_vertex_buffer(&self) -> bool
pub fn usage_indirect_buffer(&self) -> bool
Trait Implementations
sourceimpl Debug for UnsafeBuffer
impl Debug for UnsafeBuffer
sourceimpl DeviceOwned for UnsafeBuffer
impl DeviceOwned for UnsafeBuffer
sourceimpl Drop for UnsafeBuffer
impl Drop for UnsafeBuffer
sourceimpl VulkanObject for UnsafeBuffer
impl VulkanObject for UnsafeBuffer
sourceconst TYPE: DebugReportObjectTypeEXT = 9u32
const TYPE: DebugReportObjectTypeEXT = 9u32
The
DebugReportObjectTypeEXT
of the internal Vulkan handle.sourcefn internal_object(&self) -> Buffer
fn internal_object(&self) -> Buffer
Returns a reference to the object.
Auto Trait Implementations
impl RefUnwindSafe for UnsafeBuffer
impl Send for UnsafeBuffer
impl Sync for UnsafeBuffer
impl Unpin for UnsafeBuffer
impl UnwindSafe for UnsafeBuffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.