Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

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.

Re-exports§

pub use instance::*;

Modules§

assertions
Macros for validation internal to the wgpu.
instance
Types for dealing with Instances
math
Utilitary math functions.

Macros§

strict_assertstrict_asserts
This is equivalent to core::assert if the strict_asserts feature is activated, otherwise equal to core::debug_assert.
strict_assert_eqstrict_asserts
This is equivalent to core::assert_eq if the strict_asserts feature is activated, otherwise equal to core::debug_assert_eq.
strict_assert_nestrict_asserts
This is equivalent to core::assert_ne if the strict_asserts feature is activated, otherwise equal to core::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.
BlasTriangleGeometrySizeDescriptor
Descriptor for all size defining attributes of a single triangle geometry inside a bottom level acceleration structure.
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.
CopyExternalImageDestInfo
View of a texture which can be used to copy to a texture, including color space and alpha premultiplication information.
CoreCounters
wgpu-core’s internal counters.
CreateBlasDescriptor
Descriptor for creating a bottom level acceleration structure.
CreateTlasDescriptor
Descriptor for creating a top level acceleration structure.
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.
ImageSubresourceRange
Subresource range within an image
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.
Operations
Pair of load and store operations for an attachment aspect.
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.
SamplerDescriptor
Describes a Sampler.
ShaderRuntimeChecks
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.
TexelCopyBufferInfo
View of a buffer which can be used to copy to/from a texture.
TexelCopyBufferLayout
Layout of a texture in a buffer’s memory.
TexelCopyTextureInfo
View of a texture which can be used to copy to/from a buffer/texture.
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.
TextureViewDescriptor
Describes a TextureView.
VertexAttribute
Vertex inputs (attributes) to shaders.

Enums§

AccelerationStructureUpdateMode
Update mode for acceleration structure builds.
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.
BlasGeometrySizeDescriptors
Descriptor for all size defining attributes of all geometries inside a bottom level acceleration structure.
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.
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.
IndexFormat
Format of indices used with pipeline.
LoadOp
Operation to perform to the output attachment at the start of a render pass.
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.
StoreOp
Operation to perform to the output attachment at the end of a render pass.
SurfaceStatus
Status of the received surface image.
TextureAspect
Kind of data the texture holds.
TextureDataOrder
Order in which TextureData is laid out in memory.
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.
INSTANCE_BUFFER_ALIGNMENT
Alignment requirement for instance buffers used in acceleration structure builds (build_acceleration_structures_unsafe_tlas)
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.
TRANSFORM_BUFFER_ALIGNMENT
Alignment requirement for transform buffers used in acceleration structure builds
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.
ImageCopyBufferDeprecated
Old name for a TexelCopyBufferInfo.
ImageCopyTextureDeprecated
Old name for a TexelCopyTextureInfo.
ImageCopyTextureTaggedDeprecated
Old name for a CopyExternalImageDestInfo.
ImageDataLayoutDeprecated
Old name for a TexelCopyBufferLayout.
ShaderLocation
Integral type used for binding locations in shaders.