#[non_exhaustive]pub enum GpuError {
NoKernels,
LibraryLoad(String),
MissingKernel(String),
Pipeline {
name: String,
message: String,
},
InvalidArgument(String),
BufferInUse,
OutOfMemory(usize),
CommandBuffer(String),
Io(String),
ReadOnly,
}Expand description
Why a GPU operation failed.
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.
NoKernels
This build embeds no kernel library. Builds for macOS (15 or later, nuvec’s floor) always embed one, precompiled or as runtime sources, so they never report this.
LibraryLoad(String)
The kernel library could not be loaded or compiled.
MissingKernel(String)
No kernel with this name exists in the library.
Pipeline
A compute pipeline could not be created.
InvalidArgument(String)
A dispatch argument is invalid (offset out of range, too many arguments, …).
BufferInUse
The buffer is used by submitted GPU work that has not been waited on.
OutOfMemory(usize)
Metal could not allocate a buffer or command object of this many bytes.
CommandBuffer(String)
The command buffer failed on the GPU.
Io(String)
A file could not be opened or mapped.
ReadOnly
The buffer is a read-only mapped file.
Trait Implementations§
impl Eq for GpuError
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()
impl StructuralPartialEq for GpuError
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§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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