Expand description
This library describes the internal unsafe graphics abstraction API. It follows WebGPU for the most part, re-using wgpu-types, with the following deviations:
- Fully unsafe: zero overhead, zero validation.
- Compile-time backend selection via traits.
- Objects are passed by references and returned by value. No IDs.
- Mapping is persistent, with explicit synchronization.
- Resource transitions are explicit.
- All layouts are explicit. Binding model has compatibility.
General design direction is to follow the majority by the following weights:
- wgpu-core: 1.5
- primary backends (Vulkan/Metal/DX12): 1.0 each
- secondary backends (DX11/GLES): 0.5 each
Modules§
Structs§
- Acquired
Surface Texture - Alignments
- Attachment
- Attachment
Ops - Bind
Group Descriptor - BindGroup descriptor.
- Bind
Group Entry - Bind
Group Layout Descriptor - BindGroupLayout descriptor.
- Bind
Group Layout Flags - Pipeline layout creation flags.
- Buffer
Barrier - Buffer
Binding - Buffer
Copy - Buffer
Descriptor - Buffer
Mapping - Buffer
Texture Copy - Buffer
Uses - Similar to
wgt::BufferUsages
but for internal use. - Capabilities
- Color
Attachment - Command
Encoder Descriptor - Compute
Pass Descriptor - Compute
Pipeline Descriptor - Describes a compute pipeline.
- Copy
Extent - Depth
Stencil Attachment - Exposed
Adapter - Format
Aspects - Texture format capability flags.
- Instance
Descriptor - Instance
Error - Instance
Flags - Instance initialization flags.
- Memory
Flags - Naga
Shader - Naga shader module.
- Open
Device - Pipeline
Layout Descriptor - Pipeline
Layout Flags - Pipeline layout creation flags.
- Programmable
Stage - Describes a programmable pipeline stage.
- Rect
- Render
Pass Descriptor - Render
Pipeline Descriptor - Describes a render (graphics) pipeline.
- Sampler
Descriptor - Shader
Module Descriptor - Surface
Capabilities - Describes information about what a
Surface
’s presentation capabilities are. Fetch this with Adapter::surface_capabilities. - Surface
Configuration - Texture
Barrier - Texture
Binding - Texture
Copy - Texture
Copy Base - Texture
Descriptor - Texture
Format Capabilities - Texture format capability flags.
- Texture
Uses - Similar to
wgt::TextureUsages
but for internal use. - Texture
View Descriptor - TextureView descriptor.
- Validation
Canary - Flag for internal testing.
- Vertex
Buffer Layout - Describes how the vertex buffer is interpreted.
Enums§
Constants§
- MAX_
ANISOTROPY - MAX_
BIND_ GROUPS - MAX_
COLOR_ ATTACHMENTS - MAX_
MIP_ LEVELS - MAX_
VERTEX_ BUFFERS - QUERY_
SIZE - Size of a single occlusion/timestamp query, when copied into a buffer, in bytes.
Statics§
- VALIDATION_
CANARY - Stores if any API validation error has occurred in this process since it was last reset.
Traits§
- Adapter
- Api
- Command
Encoder - Encoder for commands in command buffers.
Serves as a parent for all the encoded command buffers.
Works in bursts of action: one or more command buffers are recorded,
then submitted to a queue, and then it needs to be
reset_all()
. - Device
- Instance
- Queue
- Surface
Type Aliases§
- Drop
Guard - Drop guard to signal wgpu-hal is no longer using an externally created object.
- Fence
Value - Label
- Memory
Range