Skip to main content

FrameGraphError

Enum FrameGraphError 

Source
#[non_exhaustive]
pub enum FrameGraphError {
Show 27 variants InvalidResourceDescriptor { message: String, }, InvalidBufferRange { resource: ResourceId, offset: u64, end: u64, resource_size: u64, }, InvalidTextureView { resource: ResourceId, message: String, }, ForeignHandle { expected_owner: u64, expected_recording: u64, actual_owner: u64, actual_recording: u64, }, UnclosedPass { pass: PassId, label: String, }, InvalidDebugGroupLabel { message: String, }, DebugGroupStackUnderflow, UnclosedDebugGroup { group: DebugGroupId, label: String, }, ConflictingAccesses { pass: PassId, resource: ResourceId, message: String, }, InvalidNodeOperation { pass: PassId, resource: Option<ResourceId>, message: String, }, InvalidRoot { resource: ResourceId, reason: RootReason, message: String, }, UnsupportedTextureFormatUsage { resource: ResourceId, role: AccessRole, format: TextureFormat, message: String, }, ReadBeforeWrite { pass: PassId, resource: ResourceId, range: String, }, PreserveBeforeWrite { pass: PassId, resource: ResourceId, range: String, }, ReadAfterDiscard { pass: PassId, resource: ResourceId, range: String, }, RootReferencesUndefinedContents { resource: ResourceId, range: String, }, UsageMismatch { resource: ResourceId, required: u64, available: u64, }, MissingGpuDevice, MissingNativeBinding { resource: ResourceId, }, NativeDescriptorMismatch { resource: ResourceId, message: String, }, MissingNodeExecutor { pass: PassId, expected: &'static str, }, InvalidNodeExecutor { pass: PassId, expected: &'static str, actual: NodeKind, }, WrongPassToken { executing_pass: PassId, token_pass: PassId, }, UnsupportedTransientExecution { resource: ResourceId, }, UnsupportedExecutableNode { pass: PassId, kind: NodeKind, }, CallbackFailed { pass: PassId, message: String, }, Internal { message: String, },
}
Expand description

All recording, compilation, and execution errors emitted by the FrameGraph.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

InvalidResourceDescriptor

A texture or buffer descriptor violates wgpu or FrameGraph constraints.

Fields

§message: String

Human-readable constraint violation.

§

InvalidBufferRange

A declared byte range falls outside its logical buffer.

Fields

§resource: ResourceId

Buffer whose range is invalid.

§offset: u64

Requested first byte.

§end: u64

Requested exclusive end byte.

§resource_size: u64

Logical buffer size in bytes.

§

InvalidTextureView

A texture view descriptor is incompatible with its texture.

Fields

§resource: ResourceId

Texture on which the view was requested.

§message: String

Human-readable incompatibility.

§

ForeignHandle

A logical handle from another graph or recording was used.

Fields

§expected_owner: u64

Owner identity required by the current recording.

§expected_recording: u64

Recording identity required by the current frame.

§actual_owner: u64

Owner identity carried by the supplied handle.

§actual_recording: u64

Recording identity carried by the supplied handle.

§

UnclosedPass

A PassBuilder was dropped without being finished.

Fields

§pass: PassId

Identity reserved for the unfinished pass.

§label: String

Caller-supplied pass label.

§

InvalidDebugGroupLabel

A debug-group label is empty or otherwise invalid.

Fields

§message: String

Human-readable label constraint.

§

DebugGroupStackUnderflow

A debug-group pop was attempted with no open group.

§

UnclosedDebugGroup

Compilation found an explicitly opened debug group still active.

Fields

§group: DebugGroupId

Innermost group left open.

§label: String

Caller-supplied group label.

§

ConflictingAccesses

One pass declares access combinations that cannot safely coexist.

Fields

§pass: PassId

Pass containing the conflict.

§resource: ResourceId

Resource accessed incompatibly.

§message: String

Human-readable conflict description.

§

InvalidNodeOperation

A declarative clear, copy, attachment, or executor operation is invalid.

Fields

§pass: PassId

Pass containing the invalid operation.

§resource: Option<ResourceId>

Related resource, when the operation identifies one.

§message: String

Human-readable operation constraint.

§

InvalidRoot

A root reason is incompatible with the resource’s origin, kind, or usage.

Fields

§resource: ResourceId

Resource marked as a root.

§reason: RootReason

Requested retention reason.

§message: String

Human-readable root constraint.

§

UnsupportedTextureFormatUsage

A texture format does not support a declared access role.

Fields

§resource: ResourceId

Incompatible texture resource.

§role: AccessRole

Declared pipeline role.

§format: TextureFormat

Texture format checked against device-independent capabilities.

§message: String

Human-readable capability mismatch.

§

ReadBeforeWrite

A read consumes contents that have never been defined.

Fields

§pass: PassId

Reading pass.

§resource: ResourceId

Undefined resource.

§range: String

Human-readable affected range.

§

PreserveBeforeWrite

A preserving write consumes contents that have never been defined.

Fields

§pass: PassId

Preserving writer.

§resource: ResourceId

Undefined resource.

§range: String

Human-readable affected range.

§

ReadAfterDiscard

A pass consumes contents invalidated by an earlier discard.

Fields

§pass: PassId

Consuming pass.

§resource: ResourceId

Discarded resource.

§range: String

Human-readable affected range.

§

RootReferencesUndefinedContents

An observable root ends the frame with undefined contents.

Fields

§resource: ResourceId

Root resource.

§range: String

Human-readable undefined range.

§

UsageMismatch

Retained work requires usage flags unavailable to an imported or fixed resource.

Fields

§resource: ResourceId

Resource with insufficient exposed usage.

§required: u64

Required wgpu usage bits.

§available: u64

Available wgpu usage bits.

§

MissingGpuDevice

GPU execution was requested from a CPU-only graph.

§

MissingNativeBinding

A retained imported or surface resource has no native binding.

Fields

§resource: ResourceId

Unbound logical resource.

§

NativeDescriptorMismatch

A native imported binding does not implement the recorded logical contract.

Fields

§resource: ResourceId

Logical resource being bound.

§message: String

Human-readable descriptor or usage mismatch.

§

MissingNodeExecutor

A retained executable node was finished without its required callback.

Fields

§pass: PassId

Node lacking an executor.

§expected: &'static str

Expected executor kind.

§

InvalidNodeExecutor

A builder finish method does not match the node kind.

Fields

§pass: PassId

Mismatched node.

§expected: &'static str

Executor kind required by the finish method.

§actual: NodeKind

Actual recorded node kind.

§

WrongPassToken

An execution callback tried to resolve a token declared by another pass.

Fields

§executing_pass: PassId

Pass whose callback is currently executing.

§token_pass: PassId

Pass that declared the supplied token.

§

UnsupportedTransientExecution

A transient reached an execution path that cannot allocate it.

This variant is retained for forward-compatible runtime diagnostics.

Fields

§resource: ResourceId

Transient resource that could not be materialized.

§

UnsupportedExecutableNode

A retained node kind has no runtime implementation.

Fields

§pass: PassId

Unsupported retained node.

§kind: NodeKind

Node kind lacking runtime support.

§

CallbackFailed

Generic failure explicitly reported by a user-supplied execution callback.

Fields

§pass: PassId

Pass whose callback failed.

§message: String

Callback-provided failure message.

§

Internal

An internal invariant failed; callers should report this as a bug.

Fields

§message: String

Human-readable invariant failure.

Implementations§

Source§

impl FrameGraphError

Source

pub const fn code(&self) -> &'static str

Stable diagnostic code suitable for tests, captures, and tooling.

Source

pub const fn pass(&self) -> Option<PassId>

Returns the most relevant pass identity carried by this error.

For Self::WrongPassToken this is the currently executing pass.

Source

pub const fn resource(&self) -> Option<ResourceId>

Returns the most relevant resource identity carried by this error.

Trait Implementations§

Source§

impl Clone for FrameGraphError

Source§

fn clone(&self) -> FrameGraphError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameGraphError

Source§

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

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

impl Display for FrameGraphError

Source§

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

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

impl Eq for FrameGraphError

Source§

impl Error for FrameGraphError

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

impl PartialEq for FrameGraphError

Source§

fn eq(&self, other: &FrameGraphError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FrameGraphError

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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.

Source§

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

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

Source§

impl<T> WasmNotSendSync for T

Source§

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