Expand description
Re-export of our wgpu-hal
dependency.
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 backend (GLES): 0.5
Modules
- A dummy API implementation.
- GLES API internals.
- Vulkan API internals.
Structs
offset
- offset in bytes- Flags for acceleration structures
- Information of the required size for a corresponding entries struct (+ flags)
- Flags for acceleration structure geometries
offset
- offset in bytesoffset
- offset in bytesoffset
- offset in bytesfirst_vertex
- offset in the vertex buffer (as number of vertices)indices
- optional index buffer with attributestransform
- optional transform- BindGroup descriptor.
- BindGroupLayout descriptor.
- Pipeline layout creation flags.
- Similar to
wgt::BufferUsages
but for internal use. - Updates use source_acceleration_structure if present, else the update will be performed in place. For updates, only the data is allowed to change (not the meta data or sizes).
- Describes a compute pipeline.
- Texture format capability flags.
- All buffers, buffer addresses and offsets will be ignored.The build mode will be ignored.Reducing the amount of Instances, Triangle groups or AABB groups (or the number of Triangles/AABBs in corresponding groups), may result in reduced size requirements.Any other change may result in a bigger or smaller size requirement.
- Error occurring while trying to create an instance, or create a surface from an instance; typically relating to the state of the underlying graphics API or hardware.
- Naga shader module.
- Pipeline layout creation flags.
- Describes a programmable pipeline stage.
- Describes a render (graphics) pipeline.
- Describes information about what a
Surface
’s presentation capabilities are. Fetch this with Adapter::surface_capabilities. - Texture format capability flags.
- Similar to
wgt::TextureUsages
but for internal use. - TextureView descriptor.
- Flag for internal testing.
- Describes how the vertex buffer is interpreted.
Enums
- Entries for a single descriptor
- Shader input.
Constants
- Size of a single occlusion/timestamp query, when copied into a buffer, in bytes.
Statics
- Stores the text of any validation errors that have occurred since the last call to
get_and_reset
.
Traits
- 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()
.
Type Aliases
- Drop guard to signal wgpu-hal is no longer using an externally created object.