pub enum RenderError {
Show 13 variants
CreateSurface(CreateSurfaceError),
RequestAdapter(RequestAdapterError),
RequestDevice(RequestDeviceError),
UnsupportedSurface,
UnnameablePixelOrder(TextureFormat),
SurfaceValidation,
CaptureReadback,
UnknownPreset(String),
AudioFormat(FormatError),
NoSuchAdapter {
requested: String,
available: Vec<String>,
},
AmbiguousAdapter {
requested: String,
matched: Vec<String>,
},
AdapterCannotPresent {
requested: String,
adapter: String,
},
Sink(String),
}Expand description
Something went wrong bringing up or drawing with the GPU context.
Variants§
CreateSurface(CreateSurfaceError)
Creating the wgpu surface for the window failed.
RequestAdapter(RequestAdapterError)
No GPU adapter compatible with the surface was found.
RequestDevice(RequestDeviceError)
Requesting a logical device from the adapter failed.
UnsupportedSurface
The surface reported no supported configuration on this adapter.
UnnameablePixelOrder(TextureFormat)
Frames are being produced at a texture format whose channel order has no name a frame consumer knows.
Refused rather than published under a guessed name: a consumer reading four bytes per pixel and told the wrong order draws the right picture in the wrong colours, which looks like an authoring mistake rather than a protocol one (ADR-0187).
SurfaceValidation
Acquiring the frame raised a validation error — a bug, not a recoverable surface state.
CaptureReadback
A headless capture failed to map or read back its offscreen buffer (Plan 0013 tooling path — never the live render path).
UnknownPreset(String)
A capture requested a preset name not in the loaded roster (Plan 0013).
AudioFormat(FormatError)
An audio-driven capture was handed a PCM format the analyzer rejected at the intake boundary (Plan 0013).
NoSuchAdapter
A requested graphics adapter is not on this machine. Carries the roster so the message can name what is available rather than an index nobody can interpret (ADR-0146).
Fields
AmbiguousAdapter
A requested adapter name matched more than one adapter. A substring cannot separate two adapters whose descriptions share it, so the caller is told which ones collided rather than handed an arbitrary pick.
Fields
AdapterCannotPresent
A named or indexed adapter exists on this machine but cannot present to the window that asked for it.
Only reachable on the surface path and only for the enumerated variants:
the preference variants hand the surface to wgpu as compatible_surface
and so cannot select an adapter that fails this, while Named/Index
pick out of the unfiltered roster. Refusing is the point — falling back
to a working adapter would render on a GPU the operator did not ask for
and say nothing, which is the failure --gpu exists to end (ADR-0155).
Fields
Sink(String)
The consumer of a streamed capture refused a frame — the offline render mode’s pipe closed, the encoder died, the file could not be written (Plan 0101 / ADR-0114). The string is the consumer’s own message, carried verbatim rather than flattened to “write failed”: that consumer is a child process, and a mystery broken pipe is the obvious way this path goes wrong.
Trait Implementations§
Source§impl Debug for RenderError
impl Debug for RenderError
Source§impl Display for RenderError
impl Display for RenderError
Source§impl Error for RenderError
impl Error for RenderError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()