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§
- Buffer
Init Descriptor - Describes a Buffer when allocating.
- Dispatch
Indirect Args - Argument buffer layout for dispatch_indirect commands.
- Download
Buffer - CPU accessible buffer used to download data back from the GPU.
- Draw
Indexed Indirect Args - Argument buffer layout for draw_indexed_indirect commands.
- Draw
Indirect Args - Argument buffer layout for draw_indirect commands.
- Staging
Belt - Efficiently performs many buffer writes by sharing and reusing temporary buffers.
Enums§
- Texture
Data Order - Order in which TextureData is laid out in memory.
Traits§
- Device
Ext - Utility methods not meant to be in the main API.
- Render
Encoder - Methods shared by
RenderPassandRenderBundleEncoder.
Functions§
- align_
to - Aligns a
valueto analignment. - backend_
bits_ from_ env - Get a set of backend bits from the environment variable WGPU_BACKEND.
- dx12_
shader_ compiler_ from_ env - Choose which DX12 shader compiler to use from the environment variable
WGPU_DX12_COMPILER. - gles_
minor_ version_ from_ env - Choose which minor OpenGL ES version to use from the environment variable
WGPU_GLES_MINOR_VERSION. - initialize_
adapter_ from_ env - Initialize the adapter obeying the WGPU_ADAPTER_NAME environment variable.
- initialize_
adapter_ from_ env_ or_ default - Initialize the adapter obeying the WGPU_ADAPTER_NAME environment variable and if it doesn’t exist fall back on a default adapter.
- make_
spirv_ raw - Version of make_spirv intended for use with
Device::create_shader_module_spirv. Returns raw slice instead of ShaderSource. - parse_
backends_ from_ comma_ list - Generates a set of backends from a comma separated list of case-insensitive backend names.
- power_
preference_ from_ env - Get a power preference from the environment variable WGPU_POWER_PREF