Skip to main content

create_buffer_with_options

Function create_buffer_with_options 

Source
pub unsafe fn create_buffer_with_options(
    allocator: &mut Allocator<'_>,
    info: &BufferCreateInfo<'_>,
    options: &AllocationCreateInfo<'_>,
) -> Result<(Buffer, Allocation), AllocError>
Expand description

Create, allocate, optionally map and bind an ordinary buffer transactionally.

Only recoverable native allocation OOM retries another compatible memory type. Required/preferred dedication and regions larger than the explicit block use separate storage. Empty blocks are released immediately, without caching.

§Errors

Returns checked policy/identity/limit errors or the preserved native failure.

§Safety

Info and queue-family pointers must satisfy native valid usage. Complete uses before release. Sparse and capture/replay resources are excluded. Ordinary external create/allocation profiles are admitted with caller-validated native compatibility. Protected resources and BDA require captured enabled metadata.