Expand description
Utility structures and functions that are built on top of the main wgpu API.
Nothing in this module is a part of the WebGPU API specification;
they are unique to the wgpu library.
Structs
- Describes a Buffer when allocating.
 - The structure expected in
indirect_bufferforComputePass::dispatch_workgroups_indirect. - CPU accessible buffer used to download data back from the GPU.
 - The structure expected in
indirect_bufferforRenderEncoder::draw_indexed_indirect. - The structure expected in
indirect_bufferforRenderEncoder::draw_indirect. - Efficiently performs many buffer writes by sharing and reusing temporary buffers.
 
Traits
- Utility methods not meant to be in the main API.
 - Methods shared by
RenderPassandRenderBundleEncoder. 
Functions
- Aligns a
valueto analignment. - Get a set of backend bits from the environment variable WGPU_BACKEND.
 - Choose which DX12 shader compiler to use from the environment variable
WGPU_DX12_COMPILER. - Initialize the adapter obeying the WGPU_ADAPTER_NAME environment variable.
 - Initialize the adapter obeying the WGPU_ADAPTER_NAME environment variable and if it doesn’t exist fall back on a default adapter.
 - Version of make_spirv intended for use with
Device::create_shader_module_spirv. Returns raw slice instead of ShaderSource. - Generates a set of backends from a comma separated list of case-insensitive backend names.
 - Get a power preference from the environment variable WGPU_POWER_PREF