WebGPU Headers: WGPUBufferDescriptor Struct Reference

Data Fields

WGPUChainedStructnextInChain
 
WGPUStringView label
 
WGPUBufferUsage usage
 
uint64_t size
 
WGPUBool mappedAtCreation
 

Default values can be set using WGPU_BUFFER_DESCRIPTOR_INIT as initializer.

Definition at line 1911 of file webgpu.h.

◆ nextInChain

◆ label

◆ usage

◆ size

uint64_t WGPUBufferDescriptor::size

The INIT macro sets this to 0.

Definition at line 1926 of file webgpu.h.

◆ mappedAtCreation

WGPUBool WGPUBufferDescriptor::mappedAtCreation

When true, the buffer is mapped in write mode at creation. It should thus be unmapped once its initial data has been written.

Note
Mapping at creation does not require the usage WGPUBufferUsage_MapWrite.

The INIT macro sets this to WGPU_FALSE.

Definition at line 1934 of file webgpu.h.