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
- Macros for validation internal to the wgpu.
- Utilitary math functions.
Macros
- strict_assert
strict_asserts
This is equivalent tostd::assert
if thestrict_asserts
feature is activated, otherwise equal tostd::debug_assert
. - strict_assert_eq
strict_asserts
This is equivalent tostd::assert_eq
if thestrict_asserts
feature is activated, otherwise equal tostd::debug_assert_eq
. - strict_assert_ne
strict_asserts
This is equivalent tostd::assert_ne
if thestrict_asserts
feature is activated, otherwise equal tostd::debug_assert_ne
.
Structs
- Flags for acceleration structures
- Flags for acceleration structure geometries
- Information about an adapter.
- Describes an allocation in the
AllocatorReport
. - A report that can be generated for informational purposes using
Allocator::generate_report()
. - Represents the backends that wgpu will use.
- Describes a single binding inside a bind group.
- Descriptor for all size defining attributes of a single triangle geometry inside a bottom level acceleration structure.
- Describes a blend component of a
BlendState
. - Describe the blend state of a render pipeline, within
ColorTargetState
. - Describes a
Buffer
. - Different ways that you can use a buffer.
- RGBA double precision color.
- Describes the color state of a render pipeline.
- Color write mask. Disabled color channels will not be written to.
- Describes a
CommandBuffer
. - Describes a
CommandEncoder
. - View of a texture which can be used to copy to a texture, including color space and alpha premultiplication information.
wgpu-core
’s internal counters.- Descriptor for creating a bottom level acceleration structure.
- Descriptor for creating a top level acceleration structure.
- Describes the biasing setting for the depth target.
- Describes the depth/stencil state in a render pipeline.
- Describes a
Device
. - Argument buffer layout for dispatch_indirect commands.
- Lists various ways the underlying platform does not conform to the WebGPU standard.
- Binary flags listing features that may or may not be present on downlevel adapters.
- Represents the sets of additional limits on an adapter, which take place when running on downlevel backends.
- Argument buffer layout for draw_indexed_indirect commands.
- Argument buffer layout for draw_indirect commands.
- Extent of a texture related operation.
- Features that are not guaranteed to be supported.
wgpu-hal
’s internal counters.- Subresource range within an image
- Options for creating an instance.
- Instance debugging flags.
- An internal counter for debugging purposes
- All internal counters, exposed for debugging purposes.
- Represents the sets of limits an adapter/device supports.
- Describes a memory block in the
AllocatorReport
. - Describes the multi-sampling state of a render pipeline.
- Pair of load and store operations for an attachment aspect.
- Origin of a copy from a 2D image.
- Origin of a copy to/from a texture.
- Flags for which pipeline data should be recorded.
- Nanosecond timestamp used by the presentation engine.
- Describes the state of primitive assembly and rasterization in a render pipeline.
- A range of push constant memory to pass to a shader stage.
- Describes how to create a QuerySet.
- Describes the depth/stencil attachment for render bundles.
- Describes a
RenderBundle
. - Options for requesting adapter.
- Describes a
Sampler
. - Describes how shader bound checks should be performed.
- Describes the shader stages that a binding will be visible from.
- Describes stencil state in a render pipeline.
- State of the stencil operation (fixed-pipeline stage).
- Defines the capabilities of a given surface and adapter.
- Configures a
Surface
for presentation. - View of a buffer which can be used to copy to/from a texture.
- Layout of a texture in a buffer’s memory.
- View of a texture which can be used to copy to/from a buffer/texture.
- Describes a
Texture
. - Feature flags for a texture format.
- Features supported by a given texture format
- Different ways that you can use a texture.
- Describes a
TextureView
. - Vertex inputs (attributes) to shaders.
Enums
- Update mode for acceleration structure builds.
- How edges should be handled in texture addressing.
- ASTC block dimensions
- ASTC RGBA channel
- Backends supported by wgpu.
- Specific type of a binding.
- Descriptor for all size defining attributes of all geometries inside a bottom level acceleration structure.
- Alpha blend factor.
- Alpha blend operation.
- Specific type of a buffer binding.
- Comparison function used for depth and stencil operations.
- Specifies how the alpha channel of the textures should be handled during compositing.
- Reason for “lose the device”.
- Supported physical device types.
- Selects which DX12 shader compiler to use.
- Face of a vertex.
- Texel mixing mode when sampling between texels.
- Vertex winding order which classifies the “front” face of a triangle.
- Selects which OpenGL ES 3 minor version to request.
- Format of indices used with pipeline.
- Operation to perform to the output attachment at the start of a render pass.
- Passed to
Device::poll
to control how and if it should block. - Result of a maintain operation.
- Hints to the device about the memory allocation strategy.
- Type of drawing mode for polygons
- Power Preference when choosing a physical adapter.
- Color spaces supported on the web.
- Behavior of the presentation engine based on frame rate.
- Primitive type the input mesh is composed of.
- Type of query contained in a QuerySet.
- Specific type of a sampler binding.
- Color variation to use when sampler addressing mode is
AddressMode::ClampToBorder
- Collections of shader features a device supports if they support less than WebGPU normally allows.
- Operation to perform on the stencil value.
- Specific type of a sample in a texture binding.
- Operation to perform to the output attachment at the end of a render pass.
- Status of the received surface image.
- Kind of data the texture holds.
- Order in which TextureData is laid out in memory.
- Dimensionality of a texture.
- Underlying texture data format.
- Specific type of a sample in a texture binding.
- Dimensions of a particular texture view.
- Vertex Format for a
VertexAttribute
(input). - Whether a vertex buffer is indexed by vertex or by instance.
Constants
- Buffer to buffer copy as well as buffer clear offsets and sizes must be aligned to this number.
- Buffer-Texture copies must have
bytes_per_row
aligned to this number. - Alignment requirement for instance buffers used in acceleration structure builds (
build_acceleration_structures_unsafe_tlas
) - Size to align mappings.
- Alignment all push constants need
- An offset into the query resolve buffer has to be aligned to this.
- Maximum queries in a query set
- Size of a single piece of query data.
- Alignment requirement for transform buffers used in acceleration structure builds
- Vertex buffer strides have to be aligned to this number.
Traits
Type Aliases
- Integral type used for buffer offsets.
- Integral type used for buffer slice sizes.
- Integral type used for dynamic bind group offsets.
- ImageCopyBufferDeprecatedOld name for a
TexelCopyBufferInfo
. - ImageCopyTextureDeprecatedOld name for a
TexelCopyTextureInfo
. - ImageCopyTextureTaggedDeprecatedOld name for a
CopyExternalImageDestInfo
. - ImageDataLayoutDeprecatedOld name for a
TexelCopyBufferLayout
. - Integral type used for binding locations in shaders.