Functions whose first argument has type WGPUBuffer.
More...
|
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) |
|
Functions whose first argument has type WGPUBuffer.
◆ wgpuBufferGetConstMappedRange()
void const * wgpuBufferGetConstMappedRange |
( |
WGPUBuffer | buffer, |
|
|
size_t | offset, |
|
|
size_t | size ) |
- Parameters
-
offset | Byte offset relative to the beginning of the buffer. |
size | Byte size of the range to get. The returned pointer is valid for exactly this many bytes. |
- Returns
- Returns a const pointer to beginning of the mapped range. It must not be written; writing to this range causes undefined behavior. Returns
NULL
with Implementation-Defined Logging if:
- There is any content-timeline error as defined in the WebGPU specification for
getMappedRange()
(alignments, overlaps, etc.) except for overlaps with other const ranges, which are allowed in C. (JS does not allow this because const ranges do not exist.)
◆ wgpuBufferGetMappedRange()
void * wgpuBufferGetMappedRange |
( |
WGPUBuffer | buffer, |
|
|
size_t | offset, |
|
|
size_t | size ) |
- Parameters
-
offset | Byte offset relative to the beginning of the buffer. |
size | Byte size of the range to get. The returned pointer is valid for exactly this many bytes. |
- Returns
- Returns a mutable pointer to beginning of the mapped range. Returns
NULL
with Implementation-Defined Logging if:
- There is any content-timeline error as defined in the WebGPU specification for
getMappedRange()
(alignments, overlaps, etc.)
- The buffer is not mapped with WGPUMapMode_Write.