// Ray tracing // Major missing optimizations (no api surface changes needed): // - use custom tracker to track build state // - no forced rebuilt (build mode deduction) // - lazy instance buffer allocation // - maybe share scratch and instance staging buffer allocation // - partial instance buffer uploads (api surface already designed with this in mind) // - ([non performance] extract function in build (rust function extraction with guards is a pain))
usecrate::{
command::CommandEncoderError,
device::{DeviceError, MissingFeatures},
id::{BlasId, BufferId, TlasId},
resource::{DestroyedResourceError, InvalidResourceError, MissingBufferUsageError},
}; use std::num::NonZeroU64; use std::sync::Arc;
usecrate::resource::{Blas, ResourceErrorIdent, Tlas}; use thiserror::Error; use wgt::{AccelerationStructureGeometryFlags, BufferAddress, IndexFormat, VertexFormat};
#[derive(Clone, Debug, Error)] pubenum CreateBlasError { #[error(transparent)]
Device(#[from] DeviceError), #[error(transparent)]
MissingFeatures(#[from] MissingFeatures), #[error( "Only one of 'index_count' and 'index_format' was provided (either provide both or none)"
)]
MissingIndexData, #[error("Provided format was not within allowed formats. Provided format: {0:?}. Allowed formats: {1:?}")]
InvalidVertexFormat(VertexFormat, Vec<VertexFormat>),
}
/// Error encountered while attempting to do a copy on a command encoder. #[derive(Clone, Debug, Error)] pubenum BuildAccelerationStructureError { #[error(transparent)]
Encoder(#[from] CommandEncoderError),
#[error("Blas {0:?} build vertex count is greater than creation count (needs to be less than or equal to), creation: {1:?}, build: {2:?}")]
IncompatibleBlasVertexCount(ResourceErrorIdent, u32, u32),
#[error("Blas {0:?} index count was provided at creation or building, but not the other")]
BlasIndexCountProvidedMismatch(ResourceErrorIdent),
#[error("Blas {0:?} build index count is greater than creation count (needs to be less than or equal to), creation: {1:?}, build: {2:?}")]
IncompatibleBlasIndexCount(ResourceErrorIdent, u32, u32),
#[error("Blas {0:?} index formats are different, creation format: {1:?}, provided: {2:?}")]
DifferentBlasIndexFormats(ResourceErrorIdent, Option<IndexFormat>, Option<IndexFormat>),
#[error("Blas {0:?} build sizes require index buffer but none was provided")]
MissingIndexBuffer(ResourceErrorIdent),
#[error( "Tlas {0:?} an associated instances contains an invalid custom index (more than 24bits)"
)]
TlasInvalidCustomIndex(ResourceErrorIdent),
#[error( "Tlas {0:?} has {1} active instances but only {2} are allowed as specified by the descriptor at creation"
)]
TlasInstanceCountExceeded(ResourceErrorIdent, u32, u32),
}
#[derive(Clone, Debug, Error)] pubenum ValidateBlasActionsError { #[error("Blas {0:?} is used before it is built")]
UsedUnbuilt(ResourceErrorIdent),
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.