Docs.rs
  • wgpu-types-23.0.0
    • wgpu-types 23.0.0
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Homepage
    • Repository
    • crates.io
    • Source
    • Owners
    • kvark
    • grovesNL
    • cwfitzgerald
    • github:gfx-rs:wgpu
    • Dependencies
      • bitflags ^2.6 normal
      • serde ^1 normal optional
      • serde ^1 dev
      • serde_json ^1.0.132 dev
      • js-sys ^0.3.70 normal
      • web-sys ^0.3.72 normal
    • Versions
    • 100% of the crate is documented
  • Go to latest version
  • Platform
    • wasm32-unknown-unknown
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate wgpu_types

wgpu_types23.0.0

  • All Items

Crate Items

  • Modules
  • Macros
  • Structs
  • Enums
  • Constants
  • Traits
  • Type Aliases

Crates

  • wgpu_types

Crate wgpu_types

Source
Expand description

This library describes the API surface of WebGPU that is agnostic of the backend. This API is used for targeting both Web and Native.

Modules§

  • assertions
    Macros for validation internal to the wgpu.
  • math
    Utilitary math functions.

Macros§

  • strict_assertstrict_asserts
    This is equivalent to std::assert if the strict_asserts feature is activated, otherwise equal to std::debug_assert.
  • strict_assert_eqstrict_asserts
    This is equivalent to std::assert_eq if the strict_asserts feature is activated, otherwise equal to std::debug_assert_eq.
  • strict_assert_nestrict_asserts
    This is equivalent to std::assert_ne if the strict_asserts feature is activated, otherwise equal to std::debug_assert_ne.

Structs§

  • AccelerationStructureFlags
    Flags for acceleration structures
  • AccelerationStructureGeometryFlags
    Flags for acceleration structure geometries
  • AdapterInfo
    Information about an adapter.
  • AllocationReport
    Describes an allocation in the AllocatorReport.
  • AllocatorReport
    A report that can be generated for informational purposes using Allocator::generate_report().
  • Backends
    Represents the backends that wgpu will use.
  • 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.
  • BufferDescriptor
    Describes a Buffer.
  • 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.
  • CoreCounters
    wgpu-core’s internal counters.
  • DepthBiasState
    Describes the biasing setting for the depth target.
  • DepthStencilState
    Describes the depth/stencil state in a render pipeline.
  • DeviceDescriptor
    Describes a Device.
  • DispatchIndirectArgs
    Argument buffer layout for dispatch_indirect commands.
  • DownlevelCapabilities
    Lists various ways the underlying platform does not conform to the WebGPU standard.
  • DownlevelFlags
    Binary flags listing features that may or may not be present on downlevel adapters.
  • DownlevelLimits
    Represents the sets of additional limits on an adapter, which take place when running on downlevel backends.
  • DrawIndexedIndirectArgs
    Argument buffer layout for draw_indexed_indirect commands.
  • DrawIndirectArgs
    Argument buffer layout for draw_indirect commands.
  • Extent3d
    Extent of a texture related operation.
  • Features
    Features that are not guaranteed to be supported.
  • HalCounters
    wgpu-hal’s internal counters.
  • ImageCopyBuffer
    View of a buffer which can be used to copy to/from a texture.
  • ImageCopyTexture
    View of a texture which can be used to copy to/from a buffer/texture.
  • ImageCopyTextureTagged
    View of a texture which can be used to copy to a texture, including color space and alpha premultiplication information.
  • ImageDataLayout
    Layout of a texture in a buffer’s memory.
  • ImageSubresourceRange
    Subresource range within an image
  • InstanceDescriptor
    Options for creating an instance.
  • InstanceFlags
    Instance debugging flags.
  • InternalCounter
    An internal counter for debugging purposes
  • InternalCounters
    All internal counters, exposed for debugging purposes.
  • Limits
    Represents the sets of limits an adapter/device supports.
  • MemoryBlockReport
    Describes a memory block in the AllocatorReport.
  • 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.
  • PipelineStatisticsTypes
    Flags for which pipeline data should be recorded.
  • PresentationTimestamp
    Nanosecond timestamp used by the presentation engine.
  • PrimitiveState
    Describes the state of primitive assembly and rasterization in a render pipeline.
  • PushConstantRange
    A range of push constant memory to pass to a shader stage.
  • QuerySetDescriptor
    Describes how to create a QuerySet.
  • RenderBundleDepthStencil
    Describes the depth/stencil attachment for render bundles.
  • RenderBundleDescriptor
    Describes a RenderBundle.
  • RequestAdapterOptions
    Options for requesting adapter.
  • ShaderBoundChecks
    Describes how shader bound checks should be performed.
  • 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).
  • SurfaceCapabilities
    Defines the capabilities of a given surface and adapter.
  • SurfaceConfiguration
    Configures a Surface for presentation.
  • TextureDescriptor
    Describes a Texture.
  • TextureFormatFeatureFlags
    Feature flags for a texture format.
  • TextureFormatFeatures
    Features supported by a given texture format
  • TextureUsages
    Different ways that you can use a texture.
  • VertexAttribute
    Vertex inputs (attributes) to shaders.

Enums§

  • AddressMode
    How edges should be handled in texture addressing.
  • AstcBlock
    ASTC block dimensions
  • AstcChannel
    ASTC RGBA channel
  • Backend
    Backends supported by wgpu.
  • 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.
  • CompositeAlphaMode
    Specifies how the alpha channel of the textures should be handled during compositing.
  • DeviceLostReason
    Reason for “lose the device”.
  • DeviceType
    Supported physical device types.
  • Dx12Compiler
    Selects which DX12 shader compiler to use.
  • 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.
  • Gles3MinorVersion
    Selects which OpenGL ES 3 minor version to request.
  • IndexFormat
    Format of indices used with pipeline.
  • Maintain
    Passed to Device::poll to control how and if it should block.
  • MaintainResult
    Result of a maintain operation.
  • 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.
  • PredefinedColorSpace
    Color spaces supported on the web.
  • PresentMode
    Behavior of the presentation engine based on frame rate.
  • PrimitiveTopology
    Primitive type the input mesh is composed of.
  • QueryType
    Type of query contained in a QuerySet.
  • SamplerBindingType
    Specific type of a sampler binding.
  • SamplerBorderColor
    Color variation to use when sampler addressing mode is AddressMode::ClampToBorder
  • ShaderModel
    Collections of shader features a device supports if they support less than WebGPU normally allows.
  • StencilOperation
    Operation to perform on the stencil value.
  • StorageTextureAccess
    Specific type of a sample in a texture binding.
  • SurfaceStatus
    Status of the received surface image.
  • 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.

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§

  • WasmNotSendNon-WebAssembly, or fragile-send-sync-non-atomic-wasm and non-atomics
  • WasmNotSendSync
  • WasmNotSyncNon-WebAssembly, or fragile-send-sync-non-atomic-wasm and non-atomics

Type Aliases§

  • BufferAddress
    Integral type used for buffer offsets.
  • BufferSize
    Integral type used for buffer slice sizes.
  • DynamicOffset
    Integral type used for dynamic bind group offsets.
  • ShaderLocation
    Integral type used for binding locations in shaders.

Results

Settings
Help
struct
wgpu_types::QuerySetDescriptor
Describes how to create a QuerySet.
struct
wgpu_types::BufferDescriptor
Describes a Buffer.
struct
wgpu_types::DeviceDescriptor
Describes a Device.
method
wgpu_types::QuerySetDescriptor::clone
method
wgpu_types::QuerySetDescriptor::fmt
method
wgpu_types::QuerySetDescriptor::map_label
Takes a closure and maps the label of the query set …
method
wgpu_types::QuerySetDescriptor::serialize
method
wgpu_types::QuerySetDescriptor::clone
method
wgpu_types::QuerySetDescriptor::deserialize
method
wgpu_types::QuerySetDescriptor::map_label
Takes a closure and maps the label of the query set …