Skip to main content

Module types

Module types 

Source
Expand description

Core GPU types — agpu’s own type system replacing direct wgpu dependency.

Users depend on agpu instead of wgpu. Every type is defined or re-exported here so that downstream crates never need wgpu in their Cargo.toml.

Structs§

Backends
Represents the backends that wgpu will use.
BlendComponent
Describes a blend component of a BlendState.
BlendState
Describe the blend state of a render pipeline, within ColorTargetState.
BufferUsages
Different ways that you can use a buffer.
Color
RGBA double precision color.
ColorTargetState
Describes the color state of a render pipeline.
ColorWrites
Color write mask. Disabled color channels will not be written to.
DepthBiasState
Describes the biasing setting for the depth target.
DepthStencilState
Describes the depth/stencil state in a render pipeline.
Device
Open connection to a graphics and/or compute device.
Extent3d
Extent of a texture related operation.
Features
Features that are not guaranteed to be supported.
GpuBufferDescriptor
Describes how to create a GPU buffer.
GpuSamplerDescriptor
Describes how to create a GPU sampler.
GpuTextureDescriptor
Describes how to create a GPU texture.
Instance
Context for all other wgpu objects. Instance of wgpu.
InstanceDescriptor
Options for creating an instance.
Limits
Represents the sets of limits an adapter/device supports.
MultisampleState
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.
PipelineCompilationOptions
Advanced options for use when a pipeline is compiled
PrimitiveState
Describes the state of primitive assembly and rasterization in a render pipeline.
Queue
Handle to a command queue on a device.
RenderPassColorAttachment
Describes a color attachment to a RenderPass.
RenderPassDepthStencilAttachment
Describes a depth/stencil attachment to a RenderPass.
RenderPassDescriptor
Describes the attachments of a render pass.
RenderPassTimestampWrites
Describes the timestamp writes of a render pass.
ShaderStages
Describes the shader stages that a binding will be visible from.
StencilFaceState
Describes stencil state in a render pipeline.
StencilState
State of the stencil operation (fixed-pipeline stage).
Surface
Handle to a presentable surface.
TextureUsages
Different ways that you can use a texture.
TextureView
Handle to a texture view.
VertexAttribute
Vertex inputs (attributes) to shaders.
VertexBufferLayout
Describes how the vertex buffer is interpreted.

Enums§

AddressMode
How edges should be handled in texture addressing.
BackendPreference
Backend preference for GPU initialisation.
BindingType
Specific type of a binding.
BlendFactor
Alpha blend factor.
BlendOperation
Alpha blend operation.
BufferBindingType
Specific type of a buffer binding.
CompareFunction
Comparison function used for depth and stencil operations.
Face
Face of a vertex.
FilterMode
Texel mixing mode when sampling between texels.
FrontFace
Vertex winding order which classifies the “front” face of a triangle.
GpuResourceKind
GPU resource kind — used by the resource tracker and ontology.
IndexFormat
Format of indices used with pipeline.
LoadOp
Operation to perform to the output attachment at the start of a render pass.
MapMode
Type of buffer mapping.
MemoryHints
Hints to the device about the memory allocation strategy.
PolygonMode
Type of drawing mode for polygons
PowerPreference
Power Preference when choosing a physical adapter.
PresentMode
Behavior of the presentation engine based on frame rate.
PrimitiveTopology
Primitive type the input mesh is composed of.
SamplerBindingType
Specific type of a sampler binding.
ShaderSource
Source of a shader module.
StencilOperation
Operation to perform on the stencil value.
StorageTextureAccess
Specific type of a sample in a texture binding.
StoreOp
Operation to perform to the output attachment at the end of a render pass.
SurfaceError
Result of an unsuccessful call to Surface::get_current_texture.
TextureAspect
Kind of data the texture holds.
TextureDimension
Dimensionality of a texture.
TextureFormat
Underlying texture data format.
TextureSampleType
Specific type of a sample in a texture binding.
TextureViewDimension
Dimensions of a particular texture view.
VertexFormat
Vertex Format for a VertexAttribute (input).
VertexStepMode
Whether a vertex buffer is indexed by vertex or by instance.

Type Aliases§

BufferAddress
Integral type used for buffer offsets.
BufferSize
Integral type used for buffer slice sizes.
CommandEncoderDescriptor
Describes a CommandEncoder.
Maintain
Passed to Device::poll to control how and if it should block.
SurfaceConfiguration
Describes a Surface.
TextureDescriptor
Describes a Texture.
TextureViewDescriptor
Describes a TextureView.