Enum gpu_alloc::error::AllocationError
source · pub enum AllocationError {
OutOfDeviceMemory,
OutOfHostMemory,
NoCompatibleMemoryTypes,
TooManyObjects,
}
Expand description
Enumeration of possible errors that may occur during memory allocation.
Variants§
OutOfDeviceMemory
Backend reported that device memory has been exhausted.
Deallocating device memory from the same heap may increase chance
that another allocation would succeed.
OutOfHostMemory
Backend reported that host memory has been exhausted.
Deallocating host memory may increase chance that another allocation would succeed.
NoCompatibleMemoryTypes
Allocation request cannot be fulfilled as no available memory types allowed
by Request.memory_types
mask is compatible with request.usage
.
TooManyObjects
Reached limit on allocated memory objects count.
Deallocating device memory may increase chance that another allocation would succeed.
Especially dedicated memory blocks.
If this error is returned when memory heaps are far from exhausted
Config
should be tweaked to allocate larger memory objects.
Trait Implementations§
source§impl Clone for AllocationError
impl Clone for AllocationError
source§fn clone(&self) -> AllocationError
fn clone(&self) -> AllocationError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AllocationError
impl Debug for AllocationError
source§impl Display for AllocationError
impl Display for AllocationError
source§impl Error for AllocationError
impl Error for AllocationError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<OutOfMemory> for AllocationError
impl From<OutOfMemory> for AllocationError
source§fn from(err: OutOfMemory) -> Self
fn from(err: OutOfMemory) -> Self
source§impl Hash for AllocationError
impl Hash for AllocationError
source§impl PartialEq for AllocationError
impl PartialEq for AllocationError
source§fn eq(&self, other: &AllocationError) -> bool
fn eq(&self, other: &AllocationError) -> bool
self
and other
values to be equal, and is used
by ==
.