Skip to main content

bind_buffer_memory

Function bind_buffer_memory 

Source
pub unsafe fn bind_buffer_memory(
    allocator: &mut Allocator<'_>,
    buffer: Buffer,
    allocation: &Allocation,
) -> Result<(), AllocError>
Expand description

Bind at the allocation’s actual native offset. Failed binds retain allocation and resource for retry.

Allocations for a resource accept only that target. Raw allocations query size/type/alignment and reject required dedication. Repeated library binding and aliasing are rejected. No pointer lookup or resource destruction occurs.

§Errors

Returns identity/state/association, requirement/type/range or native bind errors.

§Safety

Buffer must be live, unbound, ordinary and from this device. Meet allocation/ feature/lifetime and external host synchronization valid usage. Native calls performed outside this allocator remain caller-owned state; do not rebind them.