#[non_exhaustive]pub enum GpuError {
NoDevice,
BackendUnavailable(String),
AllocationFailed {
requested: u64,
device_max: u64,
},
ShaderCompilation(String),
MissingEntryPoint {
name: String,
},
Dispatch(String),
ReadbackTimeout {
ms: u64,
},
BindingMismatch {
expected: usize,
got: usize,
},
Backend {
op: BackendOp,
detail: String,
},
}Expand description
Errors that can occur during GPU operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoDevice
No suitable GPU device was found on this system.
The requested backend is not available (e.g. Vulkan not installed).
AllocationFailed
Buffer allocation failed — typically the device ran out of memory.
ShaderCompilation(String)
Shader compilation failed.
MissingEntryPoint
Shader is missing an entry point with the expected name.
Dispatch(String)
A dispatch or readback operation failed.
ReadbackTimeout
Readback from GPU buffer to CPU timed out.
BindingMismatch
The provided buffer count does not match the shader’s binding count.
Backend
Internal backend error (Vulkan, Metal, etc.).
Trait Implementations§
Source§impl Error for GpuError
impl Error for GpuError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for GpuError
impl RefUnwindSafe for GpuError
impl Send for GpuError
impl Sync for GpuError
impl Unpin for GpuError
impl UnsafeUnpin for GpuError
impl UnwindSafe for GpuError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more