use crate::device::OutOfMemory;
#[derive(Clone, Debug, PartialEq, thiserror::Error)]
pub enum ExternalImagePropertiesError {
#[error(transparent)]
OutOfMemory(#[from] OutOfMemory),
#[error("Format not supported")]
FormatNotSupported,
}
#[derive(Clone, Debug, PartialEq, thiserror::Error)]
pub enum ExternalResourceError {
#[error(transparent)]
OutOfMemory(#[from] OutOfMemory),
#[error("Too many objects")]
TooManyObjects,
#[error("No valid memory type id among the desired ones")]
NoValidMemoryTypeId,
#[error("The used external handle or the combination of them is invalid")]
InvalidExternalHandle,
}
#[derive(Clone, Debug, PartialEq, thiserror::Error)]
pub enum ExternalMemoryExportError {
#[error("Too many objects")]
TooManyObjects,
#[error("Out of host memory")]
OutOfHostMemory,
#[error("Invalid external handle")]
InvalidExternalHandle,
}