use {
core::fmt::{self, Display},
gpu_alloc_types::{DeviceMapError, OutOfMemory},
};
/// Enumeration of possible errors that may occur during memory allocation. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pubenum AllocationError { /// Backend reported that device memory has been exhausted.\ /// Deallocating device memory from the same heap may increase chance /// that another allocation would succeed.
OutOfDeviceMemory,
/// Backend reported that host memory has been exhausted.\ /// Deallocating host memory may increase chance that another allocation would succeed.
OutOfHostMemory,
/// Allocation request cannot be fulfilled as no available memory types allowed /// by `Request.memory_types` mask is compatible with `request.usage`.
NoCompatibleMemoryTypes,
/// 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.
TooManyObjects,
}
#[cfg(feature = "std")] impl std::error::Error for AllocationError {}
/// Enumeration of possible errors that may occur during memory mapping. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pubenum MapError { /// Backend reported that device memory has been exhausted.\ /// Deallocating device memory from the same heap may increase chance /// that another mapping would succeed.
OutOfDeviceMemory,
/// Backend reported that host memory has been exhausted.\ /// Deallocating host memory may increase chance that another mapping would succeed.
OutOfHostMemory,
/// Attempt to map memory block with non-host-visible memory type.\ /// Ensure to include `UsageFlags::HOST_ACCESS` into allocation request /// when memory mapping is intended.
NonHostVisible,
/// Map failed for implementation specific reason.\ /// For Vulkan backend this includes failed attempt /// to allocate large enough virtual address space.
MapFailed,
/// Mapping failed due to block being already mapped.
AlreadyMapped,
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.