mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 08:21:25 +01:00
remove DeviceError::Invalid, this variant should be the same as DeviceError::Lost
This commit is contained in:
1 parent
2f890eb9b2
commit
25d75e2a02
2 files changed
+1
-4
No files matched your search
@@ -332,8 +332,6 @@ impl WebGpuError for DeviceMismatch {
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[non_exhaustive]
|
||||
pub enum DeviceError {
|
||||
#[error("{0} is invalid.")]
|
||||
Invalid(ResourceErrorIdent),
|
||||
#[error("Parent device is lost")]
|
||||
Lost,
|
||||
#[error("Not enough memory left.")]
|
||||
@@ -348,7 +346,6 @@ impl WebGpuError for DeviceError {
|
||||
fn webgpu_error_type(&self) -> ErrorType {
|
||||
match self {
|
||||
DeviceError::DeviceMismatch(e) => e.webgpu_error_type(),
|
||||
Self::Invalid(_) => ErrorType::Validation,
|
||||
Self::ResourceCreationFailed => ErrorType::OutOfMemory,
|
||||
Self::Lost => ErrorType::DeviceLost {
|
||||
reason: DeviceLostReason::Unknown,
|
||||
|
||||
@@ -357,7 +357,7 @@ impl Device {
|
||||
if self.is_valid() {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(DeviceError::Invalid(self.error_ident()))
|
||||
Err(DeviceError::Lost)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user