Skip to main content

Crate webgpu_traits

Crate webgpu_traits 

Source

Re-exports§

pub use crate::encoders::*;
pub use crate::error::*;
pub use crate::ids::*;
pub use crate::messages::*;

Modules§

encoders
Encoders commands
error
Error scopes and GPUError types
id
ids
markers
messages

Structs§

Adapter
AdapterInfo
Information about an adapter.
BindGroupDescriptor
Describes a group of bindings and the resources to be bound.
BindGroupEntry
Bindable resource and the slot to bind it to. cbindgen:ignore
BindGroupLayoutDescriptor
Describes a BindGroupLayout.
BindGroupLayoutEntry
Describes a single binding inside a bind group.
BlendComponent
Describes a blend component of a BlendState.
BlendState
Describe the blend state of a render pipeline, within ColorTargetState.
BufferBinding
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.
CommandBufferDescriptor
Describes a CommandBuffer.
CommandEncoderDescriptor
Describes a CommandEncoder.
ComputePassDescriptor
ComputePipelineDescriptor
Describes a compute pipeline.
ContextConfiguration
DepthBiasState
Describes the biasing setting for the depth target.
DepthStencilState
Describes the depth/stencil state in a render pipeline.
DeviceDescriptor
Describes a Device.
ExperimentalFeatures
Token of the user agreeing to access experimental features.
Extent3d
Extent of a texture related operation.
Features
Features that are not guaranteed to be supported.
FragmentState
Describes fragment processing in a render pipeline.
IdentityManager
ImageSubresourceRange
Subresource range within an image
Limits
Represents the sets of limits an adapter/device supports.
Mapping
MultisampleState
Describes the multi-sampling state of a render pipeline.
Origin2d
Origin of a copy from a 2D image.
Origin3d
Origin of a copy to/from a texture.
PassChannel
Describes an individual channel within a render pass, such as color, depth, or stencil.
PassTimestampWrites
Describes the writing of timestamp values in a render or compute pass.
Pipeline
PipelineLayoutDescriptor
Describes a pipeline layout.
PrimitiveState
Describes the state of primitive assembly and rasterization in a render pipeline.
ProgrammableStageDescriptor
Describes a programmable pipeline stage.
RenderBundleDepthStencil
Describes the depth/stencil attachment for render bundles.
RenderBundleEncoderDescriptor
Describes a RenderBundleEncoder.
RenderPassColorAttachment
Describes a color attachment to a render pass.
RenderPassDepthStencilAttachment
Describes a depth/stencil attachment to a render pass.
RenderPassDescriptor
Describes the attachments of a render pass.
RenderPipelineDescriptor
Describes a render (graphics) pipeline.
SamplerDescriptor
Describes a Sampler
ShaderCompilationInfo
ShaderModuleDescriptor
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).
TexelCopyBufferLayout
Layout of a texture in a buffer’s memory.
TextureUsages
Different ways that you can use a texture.
TextureViewDescriptor
Describes a TextureView.
VertexAttribute
Vertex inputs (attributes) to shaders.
VertexBufferLayout
Describes how the vertex buffer is interpreted.
VertexState
Describes the vertex process in a render pipeline.
WebGPU

Enums§

AddressMode
How edges should be handled in texture addressing.
AstcBlock
ASTC block dimensions
AstcChannel
ASTC RGBA channel
BindingResource
BindingType
Type of a binding in a bind group layout.
BlendFactor
Alpha blend factor.
BlendOperation
Alpha blend operation.
BufferAccessError
BufferBindingType
Specific type of a buffer binding.
CompareFunction
Comparison function used for depth and stencil operations.
DeviceLostReason
https://gpuweb.github.io/gpuweb/#enumdef-gpudevicelostreason
DeviceType
Supported physical device types.
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.
HostMap
ImplementedLanguageExtension
A variant of LanguageExtension::Implemented.
IndexFormat
Format of indices used with pipeline.
LoadOp
Operation to perform to the output attachment at the start of a render pass.
MemoryHints
Hints to the device about the memory allocation strategy.
MipmapFilterMode
Texel mixing mode when sampling between texels.
PowerPreference
Power Preference when choosing a physical adapter.
PredefinedColorSpace
Color spaces supported on the web.
PrimitiveTopology
Primitive type the input mesh is composed of.
QueryType
Type of queries contained in a QuerySet.
RequestDeviceError
SamplerBindingType
Specific type of a sampler binding.
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.
TextureAspect
Selects a subset of the data a Texture holds.
TextureDimension
Dimensionality of a texture.
TextureFormat
Format in which a texture’s texels are stored in GPU memory.
TextureSampleType
Specific type of a sample in a texture binding.
TextureViewDimension
Dimensions of a particular texture view.
Trace
Controls API call tracing and specifies where the trace is written.
VertexFormat
Corresponds to WebGPU GPUVertexFormat.
VertexStepMode
Whether a vertex buffer is indexed by vertex or by instance.

Constants§

COPY_BUFFER_ALIGNMENT
Buffer to buffer copy as well as buffer clear offsets and sizes must be aligned to this number.
MAP_ALIGNMENT
Minimum alignment of buffer mappings.
PRESENTATION_BUFFER_COUNT

Type Aliases§

BufferAddress
Integral type used for Buffer offsets and sizes.
BufferDescriptor
BufferSize
Integral type used for BufferSlice sizes.
Label
QuerySetDescriptor
RenderBundleDescriptor
RequestAdapterOptions
TexelCopyBufferInfo
cbindgen:ignore
TexelCopyTextureInfo
cbindgen:ignore
TextureDescriptor
WebGPUAdapterResponse
WebGPUComputePipelineResponse
WebGPUDeviceResponse
WebGPUPoppedErrorScopeResponse
WebGPURenderPipelineResponse