Module pipeline_cache

Source
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§

PipelineCache
Cached wgpu render pipelines and shared bind group layouts.
SurfaceAttachment
Native presentation resources that are discarded on host suspension.
SurfaceBootstrapConfig
Configuration used when bootstrapping GPU instances/adapters.
SurfaceGpuContext
Device-bound state that can outlive a native presentation surface.
WgpuRenderContext
GPU bundle for rendering when a presentation surface is managed externally.
WgpuSurfaceBundle
Reusable GPU context plus an optional host-owned surface attachment.

Enums§

ResizeOutcome
Result of applying a pending surface resize.
SurfaceAttachmentState
Whether a reusable surface renderer currently owns a native attachment.
SurfaceConfigDeferredReason
Why surface configuration was deferred during resize/bootstrap.
SurfaceContextReuseFailure
Why a newly-created surface could not reuse the current GPU context.
SurfaceReattachOutcome
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.