Expand description
The backend-agnostic GPU hardware abstraction: device, queue, encoder and surface traits.
This is an interface crate: traits, descriptor structs, capability flags and typed errors. No logic lives here. Backends implement the traits with their own concrete resource types via associated types, so the renderer above is generic over the device with no dynamic dispatch on the hot path, and callers above the backend layer never name a backend.
Structs§
- Aabb
Geometry - Procedural AABB geometry supplied to one BLAS build.
- Aabb
Geometry Size - Size ceiling for one procedural AABB geometry in a BLAS.
- Acceleration
Geometry Flags - Per-geometry ray-query behavior.
- Acceleration
Structure Binding - One TLAS resource bound into a ray-query bind group.
- Acceleration
Structure Flags - Construction preferences for a BLAS or TLAS.
- Acceleration
Structure Layout Entry - One acceleration-structure slot in a ray-query bind-group layout.
- Arena
Allocation - A generation-checked allocation within a
PagedArena. - Arena
Metrics - Observable arena counters. Values are cumulative except resident bytes.
- Bind
Group Desc - Everything needed to create a bind group over a layout.
- Bind
Group Layout Desc - Everything needed to create a bind-group layout.
- Bind
Group Layout Entry - One slot in a bind-group layout: index, visibility, kind. Every binding index is declared here with a name; shaders never invent one.
- Blas
Build Desc - One BLAS build operation.
- Blas
Desc - Descriptor for allocating a BLAS.
- Buffer
Desc - Everything needed to create a buffer.
- Buffer
Usage - How a buffer may be used. Buffers are typed by usage and allocated once; there is deliberately no per-frame creation convenience.
- Capabilities
- What the opened device can do beyond the baseline.
- Capability
Flags - The boolean capabilities, as one word.
- Color
Attachment - One color attachment of a render pass.
- Color
Target - One color attachment a render pipeline writes.
- Command
Scratch - Reusable storage for trivially owned command descriptors.
- Command
Scratch Metrics - Command scratch counters.
- Compute
Pass Desc - Everything needed to begin a compute pass.
- Compute
Pipeline Desc - Everything needed to create a compute pipeline.
- Depth
Attachment - The depth attachment of a render pass.
- Depth
State - Depth behavior of a render pipeline.
- Device
Desc - Options for opening a device.
- Fence
Value - Monotonic submission completion value supplied by a backend.
- Opened
- The result of opening a device: the device, its queue, and a surface when a window was supplied.
- Paged
Arena - A fixed-capacity page allocator with deterministic first-fit placement.
- RayQuery
Bind Group Desc - Bind group containing regular resources and TLAS resources.
- RayQuery
Bind Group Layout Desc - Layout containing regular slots and acceleration-structure slots.
- RayQuery
Limits - Device ceilings relevant to acceleration-structure allocation.
- Render
Pass Desc - Everything needed to begin a render pass.
- Render
Pipeline Desc - Everything needed to create a render pipeline. Pipelines are created at load and cached; never inside the frame loop.
- Resource
Memory - Live physical resources allocated through a device.
- Retirement
- Work made reusable by one retirement call.
- Sampler
Desc - Everything needed to create a sampler.
- Scratch
Full - A command did not fit in fixed scratch capacity.
- Shader
Module Desc - A shader module from WGSL source. WGSL is the single shader language; backends that need another form compile it themselves.
- Shader
Stages - Which stages see a binding.
- Surface
Config - Surface configuration, refreshed on resize.
- Texture
Desc - Everything needed to create a texture.
- Texture
Format Capabilities - Renderer-relevant usage support for one texture format.
- Texture
Usage - How a texture may be used.
- Texture
View Desc - View parameters; the default views the whole texture.
- Texture
Write - One tightly described host-to-texture upload.
- Timestamp
Writes - Timestamp query writes attached to one render or compute pass.
- Tlas
Desc - Descriptor for allocating a TLAS.
- Tlas
Instance - One instance stored in a TLAS.
- Triangle
Geometry - Triangle geometry supplied to one BLAS build.
- Triangle
Geometry Size - Size ceiling for one triangle geometry in a BLAS.
- Upload
Metrics - Observable ring counters. Values are cumulative except active gauges.
- Upload
Reservation - Immutable description returned when bytes are reserved.
- Upload
Ring - A bounded host staging ring independent of any concrete GPU backend.
- Upload
Ring Config - Fixed resource and upload throughput budgets.
- Upload
Ticket - Stable identifier for one ring reservation.
Enums§
- Acceleration
Index Format - Index encoding for triangle BLAS geometry.
- Acceleration
Structure Update Mode - Whether a build may update an existing acceleration structure.
- Arena
Error - Invalid requests and stale allocation handles.
- Bind
Group Entry - A live resource bound into a slot.
- Binding
Type - What kind of resource a binding slot holds.
- Blas
Geometries - Geometry family supplied to one BLAS build.
- Blas
Geometry Sizes - Geometry family and size ceilings used to allocate a BLAS.
- Blend
Mode - How a color target blends its output.
- Compare
Function - Depth comparison functions.
- Depth
Load Op - How a depth attachment starts the pass.
- Filter
Mode - Texel filtering mode.
- GpuError
- Everything that can go wrong opening or driving a device.
- LoadOp
- How a color attachment starts the pass.
- Power
Preference - Which adapter class to prefer when several are present.
- Primitive
Topology - Primitive assembly.
- Surface
Error - Why a frame could not be acquired.
- Texture
Dimension - Texture dimensionality supported by the portable renderer.
- Texture
Format - The formats the engine renders with. A deliberate subset: every format here is universally supported on the targeted backends, and backends match on it exhaustively, so growing the set is a deliberate change.
- Upload
Backpressure - Why an upload reservation or lifecycle transition could not proceed.
- Upload
State - Current lifecycle of an upload reservation.
Traits§
- Command
Encoder - Records passes and copies into one submission.
- Compute
Pass Encoder - Records dispatches inside an open compute pass.
- Device
- A GPU device: resource creation and capability report.
- Queue
- Uploads and submission. One submission per frame is the discipline the engine holds; the trait does not enforce it, the render loop does.
- RayQuery
Command Encoder - Command-encoder extension for acceleration-structure builds.
- RayQuery
Device - Device extension for hardware acceleration structures and WGSL ray queries.
- Render
Pass Encoder - Records draws inside an open render pass.
- Surface
- A presentation surface bound to a window.
- Surface
Frame - One acquired swapchain frame.
- Window
Source - Anything a presentation surface can be created from. Embedders hand the engine their window behind this trait; the engine never names a windowing toolkit.
Type Aliases§
- Window
Target - A shared native window handle, alive for as long as its surface.