Skip to main content

RenderError

Enum RenderError 

Source
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

§requested: String

What the caller asked for, as they wrote it.

§available: Vec<String>

Every adapter this machine enumerates, described.

§

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

§requested: String

What the caller asked for, as they wrote it.

§matched: Vec<String>

The adapters the request matched.

§

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

§requested: String

What the caller asked for, as they wrote it.

§adapter: String

The adapter that request resolved to, described.

§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for RenderError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for RenderError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

§

fn to_smolstr(&self) -> SmolStr

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,