Skip to content

Commit 25d75e2

Browse files
committed
remove DeviceError::Invalid, this variant should be the same as DeviceError::Lost
1 parent 2f890eb commit 25d75e2

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

wgpu-core/src/device/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,6 @@ impl WebGpuError for DeviceMismatch {
332332
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
333333
#[non_exhaustive]
334334
pub enum DeviceError {
335-
#[error("{0} is invalid.")]
336-
Invalid(ResourceErrorIdent),
337335
#[error("Parent device is lost")]
338336
Lost,
339337
#[error("Not enough memory left.")]
@@ -348,7 +346,6 @@ impl WebGpuError for DeviceError {
348346
fn webgpu_error_type(&self) -> ErrorType {
349347
match self {
350348
DeviceError::DeviceMismatch(e) => e.webgpu_error_type(),
351-
Self::Invalid(_) => ErrorType::Validation,
352349
Self::ResourceCreationFailed => ErrorType::OutOfMemory,
353350
Self::Lost => ErrorType::DeviceLost {
354351
reason: DeviceLostReason::Unknown,

wgpu-core/src/device/resource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ impl Device {
357357
if self.is_valid() {
358358
Ok(())
359359
} else {
360-
Err(DeviceError::Invalid(self.error_ident()))
360+
Err(DeviceError::Lost)
361361
}
362362
}
363363

0 commit comments

Comments
 (0)