pub enum GraphError {
Show 13 variants
ConflictingAccess {
pass: String,
resource: String,
first: ResourceState,
second: ResourceState,
},
NoAttachments {
pass: String,
},
AttachmentExtentMismatch {
pass: String,
first: String,
first_extent: (u32, u32),
second: String,
second_extent: (u32, u32),
},
DuplicateDepthAttachment {
pass: String,
},
DuplicateDeclaration {
pass: String,
resource: String,
},
SubresourceOutOfRange {
pass: String,
resource: String,
base_mip: u32,
mip_count: u32,
base_layer: u32,
layer_count: u32,
mip_levels: u32,
layers: u32,
},
AttachmentOutsideRenderPass {
kind: &'static str,
pass: String,
resource: String,
},
UnusedTransient {
resource: String,
},
ImportStateMismatch {
resource: String,
declared: ResourceState,
left: ResourceState,
},
BufferImportStateMismatch {
resource: String,
declared: ResourceState,
left: ResourceState,
},
ImportDeclarationConflict {
resource: String,
field: ImportField,
first: String,
second: String,
},
BufferImportDeclarationConflict {
resource: String,
field: ImportField,
first: String,
second: String,
},
Hal(HalError),
}Expand description
Why a graph could not be compiled.
Variants§
ConflictingAccess
One pass declared two different states for the same resource.
Fields
first: ResourceStateThe first state declared.
second: ResourceStateThe second, incompatible state.
NoAttachments
A render pass attached nothing.
AttachmentExtentMismatch
A render pass attached images of different sizes.
Fields
DuplicateDepthAttachment
A render pass attached two depth images.
DuplicateDeclaration
One pass declared the same resource twice over the same subrange.
.color(image, ..).color(image, ..) used to be accepted and produced
two colour attachments over one view — two shader outputs writing the
same pixels, in an order nothing defines. A pass that genuinely touches
two parts of one image declares two different subresource ranges.
SubresourceOutOfRange
A pass named a mip level or array layer the image does not have.
Fields
AttachmentOutsideRenderPass
A pass that opens no render scope attached something.
Fields
kind: &'static strWhich kind of pass declared it — PassKind::name.
UnusedTransient
A transient was declared and never used, so it has no lifetime and no reason to exist.
ImportStateMismatch
An InitialClaim::Tracked import declared a state the last graph did
not leave the image in.
The whole point of the claim: the owner said it tracks this image across
frames, and the pool remembers what the previous graph’s trailing
barrier actually reached. When those disagree the first barrier of this
frame names a source scope the GPU never visits — and if the declaration
is ResourceState::Undefined it names no source scope at all, so the
transition orders against nothing while the previous frame is still
reading the same image.
Fields
declared: ResourceStateWhat the import declared as ImportedImage::initial.
left: ResourceStateWhat the last graph to execute against this pool left it in.
BufferImportStateMismatch
A buffer import declared a state the last graph did not leave it in.
GraphError::ImportStateMismatch for a resource with no layout, and
its own variant rather than the same one because the two answers a reader
needs differ. An image has a way out — say InitialClaim::Acquired and
mean it — and telling a buffer’s importer to reach for a field
ImportedBuffer does not have would send them looking for an escape
that is not there and should not be. What is left when that clause goes
is the whole of the advice: declare what the last frame left.
Fields
declared: ResourceStateWhat the import declared as ImportedBuffer::initial.
left: ResourceStateWhat the last graph to execute against this pool left it in.
ImportDeclarationConflict
One image handle was imported twice with declarations that disagree.
RenderGraph::import_image hands the second importer the id the first
one got, because one handle has to be one node with one state tracker
for the graph to barrier between two passes that reach it through
different ids. That leaves exactly one thing it cannot do quietly: two
declarations that are not the same declaration. Keeping the first would
be the graph ignoring the second — silently sampling through a view it
was not handed, or barriering out of a state the other importer says the
image is not in — so the frame is refused instead and the two importers
have to agree.
Fields
field: ImportFieldWhich field of ImportedImage disagreed.
BufferImportDeclarationConflict
One buffer handle was imported twice with declarations that disagree.
GraphError::ImportDeclarationConflict for a resource with no layout,
and a variant of its own for the same reason
GraphError::BufferImportStateMismatch is one: the message names the
resource kind, and a caller matching on the error is usually looking at
one kind of resource.
Fields
field: ImportFieldWhich field of ImportedBuffer disagreed.
Hal(HalError)
The seam refused something at execution time.
Trait Implementations§
Source§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
Source§impl Error for GraphError
impl Error for GraphError
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()