mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-23 16:01:04 +01:00
handle all variants of gpu_descriptor::AllocationError explicitly
This commit is contained in:
1 parent
7103520bd3
commit
8b6450a9ce
1 file changed
+4
-2
@@ -2496,7 +2496,9 @@ impl From<gpu_alloc::MapError> for crate::DeviceError {
|
||||
}
|
||||
impl From<gpu_descriptor::AllocationError> for crate::DeviceError {
|
||||
fn from(error: gpu_descriptor::AllocationError) -> Self {
|
||||
log::error!("descriptor allocation: {:?}", error);
|
||||
Self::OutOfMemory
|
||||
use gpu_descriptor::AllocationError as Ae;
|
||||
match error {
|
||||
Ae::OutOfDeviceMemory | Ae::OutOfHostMemory | Ae::Fragmentation => Self::OutOfMemory,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user