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