mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-24 15:54:00 +00:00
remove unused enum variants (#6550)
This commit is contained in:
parent
92ca5a3850
commit
1abf3fe90e
@ -71,8 +71,6 @@ pub enum RenderCommandError {
|
||||
BindGroupIndexOutOfRange { index: u32, max: u32 },
|
||||
#[error("Vertex buffer index {index} is greater than the device's requested `max_vertex_buffers` limit {max}")]
|
||||
VertexBufferIndexOutOfRange { index: u32, max: u32 },
|
||||
#[error("Dynamic buffer offset {0} does not respect device's requested `{1}` limit {2}")]
|
||||
UnalignedBufferOffset(u64, &'static str, u32),
|
||||
#[error("Render pipeline targets are incompatible with render pass")]
|
||||
IncompatiblePipelineTargets(#[from] crate::device::RenderPassCompatibilityError),
|
||||
#[error("{0} writes to depth, while the pass has read-only depth access")]
|
||||
|
@ -914,8 +914,6 @@ pub enum PassErrorScope {
|
||||
SetScissorRect,
|
||||
#[error("In a draw command, kind: {kind:?}")]
|
||||
Draw { kind: DrawKind, indexed: bool },
|
||||
#[error("While resetting queries after the renderpass was ran")]
|
||||
QueryReset,
|
||||
#[error("In a write_timestamp command")]
|
||||
WriteTimestamp,
|
||||
#[error("In a begin_occlusion_query command")]
|
||||
|
@ -624,10 +624,6 @@ pub enum RenderPassErrorInner {
|
||||
src: wgt::TextureFormat,
|
||||
dst: wgt::TextureFormat,
|
||||
},
|
||||
#[error("Surface texture is dropped before the render pass is finished")]
|
||||
SurfaceTextureDropped,
|
||||
#[error("Not enough memory left for render pass")]
|
||||
OutOfMemory,
|
||||
#[error("Unable to clear non-present/read-only depth")]
|
||||
InvalidDepthOps,
|
||||
#[error("Unable to clear non-present/read-only stencil")]
|
||||
|
@ -91,8 +91,6 @@ pub enum TransferError {
|
||||
UnspecifiedRowsPerImage,
|
||||
#[error("Number of bytes per row is less than the number of bytes in a complete row")]
|
||||
InvalidBytesPerRow,
|
||||
#[error("Image is 1D and the copy height and depth are not both set to 1")]
|
||||
InvalidCopySize,
|
||||
#[error("Number of rows per image is invalid")]
|
||||
InvalidRowsPerImage,
|
||||
#[error("Copy source aspects must refer to all aspects of the source texture format")]
|
||||
|
@ -151,8 +151,6 @@ pub enum WaitIdleError {
|
||||
Device(#[from] DeviceError),
|
||||
#[error("Tried to wait using a submission index ({0}) that has not been returned by a successful submission (last successful submission: {1})")]
|
||||
WrongSubmissionIndex(SubmissionIndex, SubmissionIndex),
|
||||
#[error("GPU got stuck :(")]
|
||||
StuckGpu,
|
||||
}
|
||||
|
||||
/// Resource tracking for a device.
|
||||
|
@ -537,12 +537,6 @@ pub enum QueueSubmitError {
|
||||
Unmap(#[from] BufferAccessError),
|
||||
#[error("{0} is still mapped")]
|
||||
BufferStillMapped(ResourceErrorIdent),
|
||||
#[error("Surface output was dropped before the command buffer got submitted")]
|
||||
SurfaceOutputDropped,
|
||||
#[error("Surface was unconfigured before the command buffer got submitted")]
|
||||
SurfaceUnconfigured,
|
||||
#[error("GPU got stuck :(")]
|
||||
StuckGpu,
|
||||
#[error(transparent)]
|
||||
InvalidResource(#[from] InvalidResourceError),
|
||||
#[error(transparent)]
|
||||
@ -1430,7 +1424,6 @@ impl Queue {
|
||||
Err(WaitIdleError::Device(err)) => {
|
||||
break 'error Err(QueueSubmitError::Queue(err))
|
||||
}
|
||||
Err(WaitIdleError::StuckGpu) => break 'error Err(QueueSubmitError::StuckGpu),
|
||||
Err(WaitIdleError::WrongSubmissionIndex(..)) => unreachable!(),
|
||||
};
|
||||
|
||||
|
@ -660,8 +660,6 @@ pub enum RequestDeviceError {
|
||||
Device(#[from] DeviceError),
|
||||
#[error(transparent)]
|
||||
LimitsExceeded(#[from] FailedLimit),
|
||||
#[error("Device has no queue supporting graphics")]
|
||||
NoGraphicsQueue,
|
||||
#[error("Unsupported features were requested: {0:?}")]
|
||||
UnsupportedFeature(wgt::Features),
|
||||
}
|
||||
|
@ -280,8 +280,6 @@ pub enum CreatePipelineCacheError {
|
||||
Validation(#[from] PipelineCacheValidationError),
|
||||
#[error(transparent)]
|
||||
MissingFeatures(#[from] MissingFeatures),
|
||||
#[error("Internal error: {0}")]
|
||||
Internal(String),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@ -439,8 +437,6 @@ pub enum ColorStateError {
|
||||
pipeline: validation::NumericType,
|
||||
shader: validation::NumericType,
|
||||
},
|
||||
#[error("Blend factors for {0:?} must be `One`")]
|
||||
InvalidMinMaxBlendFactors(wgt::BlendComponent),
|
||||
#[error("Invalid write mask {0:?}")]
|
||||
InvalidWriteMask(wgt::ColorWrites),
|
||||
}
|
||||
|
@ -47,8 +47,6 @@ pub enum SurfaceError {
|
||||
AlreadyAcquired,
|
||||
#[error("Texture has been destroyed")]
|
||||
TextureDestroyed,
|
||||
#[error("Acquired frame is still referenced")]
|
||||
StillReferenced,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
@ -94,8 +92,6 @@ pub enum ConfigureSurfaceError {
|
||||
requested: hal::TextureUses,
|
||||
available: hal::TextureUses,
|
||||
},
|
||||
#[error("Gpu got stuck :(")]
|
||||
StuckGpu,
|
||||
}
|
||||
|
||||
impl From<WaitIdleError> for ConfigureSurfaceError {
|
||||
@ -103,7 +99,6 @@ impl From<WaitIdleError> for ConfigureSurfaceError {
|
||||
match e {
|
||||
WaitIdleError::Device(d) => ConfigureSurfaceError::Device(d),
|
||||
WaitIdleError::WrongSubmissionIndex(..) => unreachable!(),
|
||||
WaitIdleError::StuckGpu => ConfigureSurfaceError::StuckGpu,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,8 +44,6 @@ pub enum CreateTlasError {
|
||||
CreateBufferError(#[from] CreateBufferError),
|
||||
#[error("Features::RAY_TRACING_ACCELERATION_STRUCTURE is not enabled")]
|
||||
MissingFeature,
|
||||
#[error("Unimplemented Tlas error: this error is not yet implemented")]
|
||||
Unimplemented,
|
||||
}
|
||||
|
||||
/// Error encountered while attempting to do a copy on a command encoder.
|
||||
@ -132,9 +130,6 @@ pub enum BuildAccelerationStructureError {
|
||||
#[error("BlasId is invalid or destroyed (for instance)")]
|
||||
InvalidBlasIdForInstance,
|
||||
|
||||
#[error("Blas {0:?} is invalid or destroyed (for instance)")]
|
||||
InvalidBlasForInstance(ResourceErrorIdent),
|
||||
|
||||
#[error("TlasId is invalid or destroyed")]
|
||||
InvalidTlasId,
|
||||
|
||||
@ -150,18 +145,12 @@ pub enum BuildAccelerationStructureError {
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
pub enum ValidateBlasActionsError {
|
||||
#[error("BlasId is invalid or destroyed")]
|
||||
InvalidBlas,
|
||||
|
||||
#[error("Blas {0:?} is used before it is built")]
|
||||
UsedUnbuilt(ResourceErrorIdent),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
pub enum ValidateTlasActionsError {
|
||||
#[error("Tlas {0:?} is invalid or destroyed")]
|
||||
InvalidTlas(ResourceErrorIdent),
|
||||
|
||||
#[error("Tlas {0:?} is used before it is built")]
|
||||
UsedUnbuilt(ResourceErrorIdent),
|
||||
|
||||
|
@ -206,9 +206,6 @@ pub enum BufferMapAsyncStatus {
|
||||
MapAlreadyPending,
|
||||
/// An unknown error.
|
||||
Error,
|
||||
/// Mapping was aborted (by unmapping or destroying the buffer before mapping
|
||||
/// happened).
|
||||
Aborted,
|
||||
/// The context is Lost.
|
||||
ContextLost,
|
||||
/// The buffer is in an invalid state.
|
||||
@ -1746,8 +1743,6 @@ pub enum CreateTextureViewError {
|
||||
Device(#[from] DeviceError),
|
||||
#[error(transparent)]
|
||||
DestroyedResource(#[from] DestroyedResourceError),
|
||||
#[error("Not enough memory left to create texture view")]
|
||||
OutOfMemory,
|
||||
#[error("Invalid texture view dimension `{view:?}` with texture of dimension `{texture:?}`")]
|
||||
InvalidTextureViewDimension {
|
||||
view: wgt::TextureViewDimension,
|
||||
@ -1896,9 +1891,6 @@ pub enum CreateSamplerError {
|
||||
filter_mode: wgt::FilterMode,
|
||||
anisotropic_clamp: u16,
|
||||
},
|
||||
#[error("Cannot create any more samplers")]
|
||||
TooManyObjects,
|
||||
/// AddressMode::ClampToBorder requires feature ADDRESS_MODE_CLAMP_TO_BORDER.
|
||||
#[error(transparent)]
|
||||
MissingFeatures(#[from] MissingFeatures),
|
||||
}
|
||||
|
@ -169,10 +169,6 @@ pub enum BindingError {
|
||||
InconsistentlyDerivedType,
|
||||
#[error("Texture format {0:?} is not supported for storage use")]
|
||||
BadStorageFormat(wgt::TextureFormat),
|
||||
#[error(
|
||||
"Storage texture with access {0:?} doesn't have a matching supported `StorageTextureAccess`"
|
||||
)]
|
||||
UnsupportedTextureStorageAccess(naga::StorageAccess),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
|
Loading…
Reference in New Issue
Block a user