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.
- Texture
Blitter wgsl
- Texture Blitting (Copying) Utility
- Texture
Blitter Builder wgsl
- A builder for the
TextureBlitter
utility. If you want the defaultTextureBlitter
useTextureBlitter::new
instead.
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
RenderPass
andRenderBundleEncoder
. - Texture
Format Ext - Adds extra conversion functions to
TextureFormat
.
Functions§
- align_
to - Aligns a
value
to analignment
. - initialize_
adapter_ from_ env native
- 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.
- is_
browser_ webgpu_ supported - Determines whether the
Backends::BROWSER_WEBGPU
backend is supported. - make_
spirv spirv
- Treat the given byte slice as a SPIR-V module.
- make_
spirv_ raw - Version of make_spirv intended for use with
Device::create_shader_module_spirv
. Returns raw slice instead of ShaderSource. - new_
instance_ with_ webgpu_ detection - Create an new instance of wgpu, but disabling
Backends::BROWSER_WEBGPU
if no WebGPU support was detected. - pipeline_
cache_ key - A recommended key for storing
PipelineCache
s for the adapter associated with the givenAdapterInfo
This key will define a class of adapters for which the same cache might be valid.