Re-exports§
Modules§
- util
- Utility structures and functions.
Macros§
- include_
spirv_ raw - Macro to load raw SPIR-V data statically, for use with
Features::SPIRV_SHADER_PASSTHROUGH
. - include_
wgsl - Macro to load a WGSL module statically.
- vertex_
attr_ array - Macro to produce an array of
VertexAttribute
.
Structs§
- Adapter
- Handle to a physical graphics and/or compute device.
- Adapter
Info - Information about an adapter.
- Backends
- Represents the backends that wgpu will use.
- Bind
Group - Handle to a binding group.
- Bind
Group Descriptor - Describes a group of bindings and the resources to be bound.
- Bind
Group Entry - Bindable resource and the slot to bind it to.
- Bind
Group Layout - Handle to a binding group layout.
- Bind
Group Layout Descriptor - Describes a
BindGroupLayout
. - Bind
Group Layout Entry - Describes a single binding inside a bind group.
- Blend
Component - Describes the blend component of a pipeline.
- Blend
State - Describe the blend state of a render pipeline.
- Buffer
- Handle to a GPU-accessible buffer.
- Buffer
Async Error - Error occurred when trying to async map a buffer.
- Buffer
Binding - Describes the segment of a buffer to bind.
- Buffer
Slice - Slice into a
Buffer
. - Buffer
Usages - Different ways that you can use a buffer.
- Buffer
View - Read only view into a mapped buffer.
- Buffer
View Mut - Write only view into mapped buffer.
- Color
- RGBA double precision color.
- Color
Target State - Describes the color state of a render pipeline.
- Color
Writes - Color write mask. Disabled color channels will not be written to.
- Command
Buffer - Handle to a command buffer on the GPU.
- Command
Buffer Descriptor - Describes a [
CommandBuffer
]. - Command
Encoder - Encodes a series of GPU operations.
- Compute
Pass - In-progress recording of a compute pass.
- Compute
Pass Descriptor - Describes the attachments of a compute pass.
- Compute
Pipeline - Handle to a compute pipeline.
- Compute
Pipeline Descriptor - Describes a compute pipeline.
- Depth
Bias State - Describes the biasing setting for the depth target.
- Depth
Stencil State - Describes the depth/stencil state in a render pipeline.
- Device
- Open connection to a graphics and/or compute device.
- Downlevel
Capabilities - Lists various ways the underlying platform does not conform to the WebGPU standard.
- Downlevel
Flags - Binary flags listing features that may or may not be present on downlevel adapters.
- Extent3d
- Extent of a texture related operation.
- Features
- Features that are not guaranteed to be supported.
- Fragment
State - Describes the fragment process in a render pipeline.
- Image
Copy Buffer Base - View of a buffer which can be used to copy to/from a texture.
- Image
Copy Texture Base - View of a texture which can be used to copy to/from a buffer/texture.
- Image
Data Layout - Layout of a texture in a buffer’s memory.
- Image
Subresource Range - Subresource range within an image
- Instance
- Context for all other wgpu objects. Instance of wgpu.
- Limits
- Represents the sets of limits an adapter/device supports.
- Multisample
State - Describes the multi-sampling state of a render pipeline.
- Operations
- Pair of load and store operations for an attachment aspect.
- Origin3d
- Origin of a copy to/from a texture.
- Pipeline
Layout - Handle to a pipeline layout.
- Pipeline
Layout Descriptor - Describes a pipeline layout.
- Pipeline
Statistics Types - Flags for which pipeline data should be recorded.
- Primitive
State - Describes the state of primitive assembly and rasterization in a render pipeline.
- Push
Constant Range - A range of push constant memory to pass to a shader stage.
- Query
Set - Handle to a query set.
- Queue
- Handle to a command queue on a device.
- Redraw
Trigger - Proxy to request a redraw from another thread
- Render
Bundle - Pre-prepared reusable bundle of GPU operations.
- Render
Bundle Depth Stencil - Describes the depth/stencil attachment for render bundles.
- Render
Bundle Encoder - Encodes a series of GPU operations into a reusable “render bundle”.
- Render
Bundle Encoder Descriptor - Describes a
RenderBundleEncoder
. - Render
Pass - In-progress recording of a render pass.
- Render
Pass Color Attachment - Describes a color attachment to a
RenderPass
. - Render
Pass Depth Stencil Attachment - Describes a depth/stencil attachment to a
RenderPass
. - Render
Pass Descriptor - Describes the attachments of a render pass.
- Render
Pipeline - Handle to a rendering (graphics) pipeline.
- Render
Pipeline Descriptor - Describes a render (graphics) pipeline.
- Request
Adapter Options Base - Options for requesting adapter.
- Request
Device Error - Requesting a device failed.
- Sampler
- Handle to a sampler.
- Sampler
Descriptor - Describes a
Sampler
- Shader
Module - Handle to a compiled shader module.
- Shader
Module Descriptor - Descriptor for a shader module.
- Shader
Module Descriptor SpirV - Descriptor for a shader module given by SPIR-V binary.
- Shader
Stages - Describes the shader stages that a binding will be visible from.
- Stencil
Face State - Describes stencil state in a render pipeline.
- Stencil
State - State of the stencil operation (fixed-pipeline stage).
- Surface
- Handle to a presentable surface.
- Surface
Configuration - Configures a [
Surface
] for presentation. - Surface
Texture - Surface texture that can be rendered to.
Result of a successful call to
Surface::get_current_texture
. - Texture
- Handle to a texture on the GPU.
- Texture
Format Feature Flags - Feature flags for a texture format.
- Texture
Format Features - Features supported by a given texture format
- Texture
Usages - Different ways that you can use a texture.
- Texture
Vertex - Format for verticies for textures
- Texture
View - Handle to a texture view.
- Texture
View Descriptor - Describes a
TextureView
. - Vertex
- The format for vertices for this program
- Vertex
Attribute - Vertex inputs (attributes) to shaders.
- Vertex
Buffer Layout - Describes how the vertex buffer is interpreted.
- Vertex
State - Describes the vertex process in a render pipeline.
- Window
- A 3d accelerated window
Enums§
- Address
Mode - How edges should be handled in texture addressing.
- Backend
- Backends supported by wgpu.
- Binding
Resource - Resource that can be bound to a pipeline.
- Binding
Type - Specific type of a binding.
- Blend
Factor - Alpha blend factor.
- Blend
Operation - Alpha blend operation.
- Buffer
Binding Type - Specific type of a buffer binding.
- Camera
Mode - Camera modes for the built-in cameras
- Compare
Function - Comparison function used for depth and stencil operations.
- Device
Type - Supported physical device types.
- Draw
Command - Different commands we can use to draw data
- Error
- Error statuses
- Error
Filter - Filter for error scopes.
- Face
- Face of a vertex.
- Filter
Mode - Texel mixing mode when sampling between texels.
- Font
- Front
Face - Winding order which classifies the “front” face.
- Index
Format - Format of indices used with pipeline.
- LoadOp
- Operation to perform to the output attachment at the start of a renderpass.
- Maintain
- Passed to
Device::poll
to control if it should block or not. This has no effect on the web. - MapMode
- Type of buffer mapping.
- Msaa
- MSAA values
- Persist
- Should the drawing persist in the scene buffer such that it can be incrementally built on
- Polygon
Mode - Type of drawing mode for polygons
- Power
Preference - Power Preference when choosing a physical adapter.
- Present
Mode - Behavior of the presentation engine based on frame rate.
- Primitive
Topology - Primitive type the input mesh is composed of.
- Query
Type - Type of query contained in a QuerySet.
- Sampler
Binding Type - Specific type of a sampler binding.
- Sampler
Border Color - Color variation to use when sampler addressing mode is
AddressMode::ClampToBorder
- Shader
Model - Collections of shader features a device supports if they support less than WebGPU normally allows.
- Shader
Source - Source of a shader module.
- Stencil
Operation - Operation to perform on the stencil value.
- Storage
Texture Access - Specific type of a sample in a texture binding.
- Surface
Error - Result of an unsuccessful call to
Surface::get_current_texture
. - Surface
Status - Status of the recieved surface image.
- Texture
Aspect - Kind of data the texture holds.
- Texture
Dimension - Dimensionality of a texture.
- Texture
Format - Underlying texture data format.
- Texture
Sample Type - Specific type of a sample in a texture binding.
- Texture
View Dimension - Dimensions of a particular texture view.
- Vertex
Format - Vertex Format for a Vertex Attribute (input).
- Vertex
Step Mode - Rate that determines when vertex data is advanced.
- Virtual
KeyCode - Symbolic name for a keyboard key.
- Vsync
- Vsync
Constants§
- COPY_
BUFFER_ ALIGNMENT - Buffer to buffer copy as well as buffer clear offsets and sizes must be aligned to this number.
- COPY_
BYTES_ PER_ ROW_ ALIGNMENT - Buffer-Texture copies must have
bytes_per_row
aligned to this number. - MAP_
ALIGNMENT - Size to align mappings.
- PUSH_
CONSTANT_ ALIGNMENT - Alignment all push constants need
- QUERY_
RESOLVE_ BUFFER_ ALIGNMENT - An offset into the query resolve buffer has to be aligned to this.
- QUERY_
SET_ MAX_ QUERIES - Maximum queries in a query set
- QUERY_
SIZE - Size of a single piece of query data.
- VERTEX_
STRIDE_ ALIGNMENT - Vertex buffer strides have to be aligned to this number.
Traits§
- Event
Handler - Required trait to handle rendering events
- Uncaptured
Error Handler - Type for the callback of uncaptured error handler
Type Aliases§
- Buffer
Address - Integral type used for buffer offsets.
- Buffer
Descriptor - Describes a
Buffer
. - Buffer
Size - Integral type used for buffer slice sizes.
- Command
Encoder Descriptor - Describes a
CommandEncoder
. - Device
Descriptor - Describes a
Device
. - Dynamic
Offset - Integral type used for dynamic bind group offsets.
- Image
Copy Buffer - View of a buffer which can be used to copy to/from a texture.
- Image
Copy Texture - View of a texture which can be used to copy to/from a buffer/texture.
- Label
- Object label.
- Query
SetDescriptor - Describes a
QuerySet
. - Render
Bundle Descriptor - Describes a
RenderBundle
. - Request
Adapter Options - Additional information required when requesting an adapter.
- Shader
Location - Integral type used for binding locations in shaders.
- Texture
Descriptor - Describes a
Texture
.