Skip to main content

create_buffer

Function create_buffer 

Source
pub unsafe fn create_buffer(
    allocator: &mut Allocator<'_>,
    info: &BufferCreateInfo,
    required: MemoryPropertyFlags,
    preferred: MemoryPropertyFlags,
) -> Result<(Buffer, Allocation), AllocError>
Expand description

Transactionally create, query, allocate and bind an ordinary buffer.

Core 1.1 or enabled KHR dedication uses requirements2 with a dedicated requirements output chain and dedicates this separate allocation to the buffer, even when dedication is only preferred or unnecessary. Core 1.0 without dedication uses legacy requirements. Exact PFN spellings are retained.

ยงSafety

Info/limits/queue-family data and ordinary buffer usage must satisfy Vulkan valid usage. Arbitrary chains, sparse/protected/external/BDA are excluded.