#[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
InvalidResourceDescriptor
A texture or buffer descriptor violates wgpu or FrameGraph constraints.
InvalidBufferRange
A declared byte range falls outside its logical buffer.
Fields
resource: ResourceIdBuffer whose range is invalid.
InvalidTextureView
A texture view descriptor is incompatible with its texture.
Fields
resource: ResourceIdTexture on which the view was requested.
ForeignHandle
A logical handle from another graph or recording was used.
Fields
UnclosedPass
A PassBuilder was dropped without being finished.
Fields
InvalidDebugGroupLabel
A debug-group label is empty or otherwise invalid.
DebugGroupStackUnderflow
A debug-group pop was attempted with no open group.
UnclosedDebugGroup
Compilation found an explicitly opened debug group still active.
ConflictingAccesses
One pass declares access combinations that cannot safely coexist.
Fields
resource: ResourceIdResource accessed incompatibly.
InvalidNodeOperation
A declarative clear, copy, attachment, or executor operation is invalid.
Fields
resource: Option<ResourceId>Related resource, when the operation identifies one.
InvalidRoot
A root reason is incompatible with the resource’s origin, kind, or usage.
Fields
resource: ResourceIdResource marked as a root.
reason: RootReasonRequested retention reason.
UnsupportedTextureFormatUsage
A texture format does not support a declared access role.
Fields
resource: ResourceIdIncompatible texture resource.
role: AccessRoleDeclared pipeline role.
format: TextureFormatTexture format checked against device-independent capabilities.
ReadBeforeWrite
A read consumes contents that have never been defined.
Fields
resource: ResourceIdUndefined resource.
PreserveBeforeWrite
A preserving write consumes contents that have never been defined.
Fields
resource: ResourceIdUndefined resource.
ReadAfterDiscard
A pass consumes contents invalidated by an earlier discard.
Fields
resource: ResourceIdDiscarded resource.
RootReferencesUndefinedContents
An observable root ends the frame with undefined contents.
UsageMismatch
Retained work requires usage flags unavailable to an imported or fixed resource.
Fields
resource: ResourceIdResource with insufficient exposed usage.
MissingGpuDevice
GPU execution was requested from a CPU-only graph.
MissingNativeBinding
A retained imported or surface resource has no native binding.
Fields
resource: ResourceIdUnbound logical resource.
NativeDescriptorMismatch
A native imported binding does not implement the recorded logical contract.
Fields
resource: ResourceIdLogical resource being bound.
MissingNodeExecutor
A retained executable node was finished without its required callback.
InvalidNodeExecutor
A builder finish method does not match the node kind.
Fields
WrongPassToken
An execution callback tried to resolve a token declared by another pass.
Fields
UnsupportedTransientExecution
A transient reached an execution path that cannot allocate it.
This variant is retained for forward-compatible runtime diagnostics.
Fields
resource: ResourceIdTransient resource that could not be materialized.
UnsupportedExecutableNode
A retained node kind has no runtime implementation.
CallbackFailed
Generic failure explicitly reported by a user-supplied execution callback.
Internal
An internal invariant failed; callers should report this as a bug.
Implementations§
Source§impl FrameGraphError
impl FrameGraphError
Sourcepub const fn code(&self) -> &'static str
pub const fn code(&self) -> &'static str
Stable diagnostic code suitable for tests, captures, and tooling.
Sourcepub const fn pass(&self) -> Option<PassId>
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.
Sourcepub const fn resource(&self) -> Option<ResourceId>
pub const fn resource(&self) -> Option<ResourceId>
Returns the most relevant resource identity carried by this error.
Trait Implementations§
Source§impl Clone for FrameGraphError
impl Clone for FrameGraphError
Source§fn clone(&self) -> FrameGraphError
fn clone(&self) -> FrameGraphError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FrameGraphError
impl Debug for FrameGraphError
Source§impl Display for FrameGraphError
impl Display for FrameGraphError
impl Eq for FrameGraphError
Source§impl Error for FrameGraphError
impl Error for FrameGraphError
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()
Source§impl PartialEq for FrameGraphError
impl PartialEq for FrameGraphError
impl StructuralPartialEq for FrameGraphError
Auto Trait Implementations§
impl Freeze for FrameGraphError
impl RefUnwindSafe for FrameGraphError
impl Send for FrameGraphError
impl Sync for FrameGraphError
impl Unpin for FrameGraphError
impl UnsafeUnpin for FrameGraphError
impl UnwindSafe for FrameGraphError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.