Module util

Module util 

Source
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§

BufferInitDescriptor
Describes a Buffer when allocating.
DispatchIndirectArgs
Argument buffer layout for dispatch_indirect commands.
DownloadBuffer
CPU accessible buffer used to download data back from the GPU.
DrawIndexedIndirectArgs
Argument buffer layout for draw_indexed_indirect commands.
DrawIndirectArgs
Argument buffer layout for draw_indirect commands.
StagingBelt
Efficiently performs many buffer writes by sharing and reusing temporary buffers.

Enums§

TextureDataOrder
Order in which TextureData is laid out in memory.

Traits§

DeviceExt
Utility methods not meant to be in the main API.
RenderEncoder
Methods shared by RenderPass and RenderBundleEncoder.

Functions§

align_to
Aligns a value to an alignment.
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