1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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,
}