WebGPU Headers
The WebGPU C API
 
Loading...
Searching...
No Matches
WGPUBuffer methods

Functions whose first argument has type WGPUBuffer. More...

Functions

void wgpuBufferDestroy (WGPUBuffer buffer)
 
void const * wgpuBufferGetConstMappedRange (WGPUBuffer buffer, size_t offset, size_t size)
 
WGPUBufferMapState wgpuBufferGetMapState (WGPUBuffer buffer)
 
void * wgpuBufferGetMappedRange (WGPUBuffer buffer, size_t offset, size_t size)
 
uint64_t wgpuBufferGetSize (WGPUBuffer buffer)
 
WGPUBufferUsage wgpuBufferGetUsage (WGPUBuffer buffer)
 
WGPUFuture wgpuBufferMapAsync (WGPUBuffer buffer, WGPUMapMode mode, size_t offset, size_t size, WGPUBufferMapCallbackInfo callbackInfo)
 
void wgpuBufferSetLabel (WGPUBuffer buffer, WGPUStringView label)
 
void wgpuBufferUnmap (WGPUBuffer buffer)
 
void wgpuBufferAddRef (WGPUBuffer buffer)
 
void wgpuBufferRelease (WGPUBuffer buffer)
 

Detailed Description

Functions whose first argument has type WGPUBuffer.

Function Documentation

◆ wgpuBufferDestroy()

void wgpuBufferDestroy ( WGPUBuffer buffer)

◆ wgpuBufferGetConstMappedRange()

void const * wgpuBufferGetConstMappedRange ( WGPUBuffer buffer,
size_t offset,
size_t size )

Returns a const pointer to beginning of the mapped range. It must not be written; writing to this range causes undefined behavior. See GetMappedRange/GetConstMappedRange Behavior for error conditions and guarantees. This function is safe to call inside spontaneous callbacks (see Callback Reentrancy).

Parameters
offsetByte offset relative to the beginning of the buffer.
sizeByte size of the range to get. The returned pointer is valid for exactly this many bytes.

◆ wgpuBufferGetMapState()

WGPUBufferMapState wgpuBufferGetMapState ( WGPUBuffer buffer)

◆ wgpuBufferGetMappedRange()

void * wgpuBufferGetMappedRange ( WGPUBuffer buffer,
size_t offset,
size_t size )

Returns a mutable pointer to beginning of the mapped range. See GetMappedRange/GetConstMappedRange Behavior for error conditions and guarantees. This function is safe to call inside spontaneous callbacks (see Callback Reentrancy).

Parameters
offsetByte offset relative to the beginning of the buffer.
sizeByte size of the range to get. The returned pointer is valid for exactly this many bytes.

◆ wgpuBufferGetSize()

uint64_t wgpuBufferGetSize ( WGPUBuffer buffer)

◆ wgpuBufferGetUsage()

WGPUBufferUsage wgpuBufferGetUsage ( WGPUBuffer buffer)

◆ wgpuBufferMapAsync()

WGPUFuture wgpuBufferMapAsync ( WGPUBuffer buffer,
WGPUMapMode mode,
size_t offset,
size_t size,
WGPUBufferMapCallbackInfo callbackInfo )

◆ wgpuBufferSetLabel()

void wgpuBufferSetLabel ( WGPUBuffer buffer,
WGPUStringView label )

◆ wgpuBufferUnmap()

void wgpuBufferUnmap ( WGPUBuffer buffer)

◆ wgpuBufferAddRef()

void wgpuBufferAddRef ( WGPUBuffer buffer)

◆ wgpuBufferRelease()

void wgpuBufferRelease ( WGPUBuffer buffer)