Buffer

A handle to a GPU-accessible buffer.

Members

Functions

destroy
void destroy()

Release the given handle.

getMappedRange
ubyte[] getMappedRange(BufferAddress start, BufferAddress size)

Get the sliced Buffer data requested by either Buffer.mapReadAsync or Buffer.mapWriteAsync.

mapReadAsync
void mapReadAsync(BufferAddress start, BufferAddress size)

Map the buffer for reading asynchronously.

mapWriteAsync
void mapWriteAsync(BufferAddress start, BufferAddress size)

Map the buffer for writing asynchronously.

unmap
void unmap()

Flushes any pending write operations and unmaps the buffer from host memory.

Variables

descriptor
BufferDescriptor descriptor;

Describes this Buffer.

id
WgpuId id;

Handle identifier.

status
BufferMapAsyncStatus status;

Result of a call to Buffer.mapReadAsync or Buffer.mapWriteAsync.

See Also

Meta