Expand description
wgpu pipelines and surface bundle. Cached render pipelines, GPU bootstrap policy, and presentation-surface state.
This module separates reusable device-bound resources from the native surface attachment so a host can detach and later reattach a window.
Structs§
- Pipeline
Cache - Cached wgpu render pipelines and shared bind group layouts.
- Surface
Attachment - Native presentation resources that are discarded on host suspension.
- Surface
Bootstrap Config - Configuration used when bootstrapping GPU instances/adapters.
- Surface
GpuContext - Device-bound state that can outlive a native presentation surface.
- Wgpu
Render Context - GPU bundle for rendering when a presentation surface is managed externally.
- Wgpu
Surface Bundle - Reusable GPU context plus an optional host-owned surface attachment.
Enums§
- Resize
Outcome - Result of applying a pending surface resize.
- Surface
Attachment State - Whether a reusable surface renderer currently owns a native attachment.
- Surface
Config Deferred Reason - Why surface configuration was deferred during resize/bootstrap.
- Surface
Context Reuse Failure - Why a newly-created surface could not reuse the current GPU context.
- Surface
Reattach Outcome - Result of attaching a new native surface to an existing renderer.
Functions§
- build_
surface_ config - Builds a concrete presentation configuration from advertised capabilities.
- choose_
alpha_ mode - Chooses an advertised surface-composition alpha mode.
- choose_
present_ mode - Chooses FIFO when available, otherwise the first concrete present mode.
- choose_
surface_ format - Chooses the first sRGB format, falling back to the first advertised format.
- choose_
surface_ usage - Selects renderer surface usages from the capabilities bit set.
- gpu_
debug_ enabled - Returns whether stderr GPU diagnostics are enabled.
- surface_
config_ deferred_ reason - Reports whether surface capabilities are temporarily insufficient.