Skip to main content

bind_image_memory2

Function bind_image_memory2 

Source
pub unsafe fn bind_image_memory2(
    allocator: &mut Allocator<'_>,
    image: Image,
    allocation: &Allocation,
    local_offset: u64,
    next: *const c_void,
) -> Result<(), AllocError>
Expand description

Bind an ordinary image or one disjoint plane with an allocation-local offset and native chain. A plane uses unassociated raw storage allocated from caller-queried plane requirements. The allocator re-queries that exact plane before binding and tracks each plane independently; DRM modifier plane aspects remain excluded.

§Errors

Same checked state/range/chain, per-item and native errors as bind_buffer_memory2.

§Safety

Same native chain/lifetime/completion contract as bind_buffer_memory2; image semantics must meet native valid usage for the selected plane. Destroy a disjoint image once, then free all its plane allocations; do not use the ordinary paired destroy_image helper for a plane allocation.