Improve error reporting on missing extensions during device creation
@@ -511,6 +511,8 @@ pub enum DeviceCreationError {
UnsupportedFeatures,
/// The priority of one of the queues is out of the [0.0; 1.0] range.
PriorityOutOfRange,
+ /// Some of the requested device extensions are not supported by the physical device.
+ ExtensionNotPresent,
}
impl error::Error for DeviceCreationError {
@@ -530,6 +532,9 @@ impl error::Error for DeviceCreationError {
DeviceCreationError::PriorityOutOfRange => {
"the priority of one of the queues is out of the [0.0; 1.0] range"
},
+ DeviceCreationError::ExtensionNotPresent => {
+ "some of the requested device extensions are not supported by the physical device"
+ }
}
}
}
@@ -547,6 +552,7 @@ impl From<Error> for DeviceCreationError {
match err {
Error::OutOfHostMemory => DeviceCreationError::OutOfHostMemory,
Error::OutOfDeviceMemory => DeviceCreationError::OutOfDeviceMemory,
+ Error::ExtensionNotPresent => DeviceCreationError::ExtensionNotPresent,
_ => panic!("Unexpected error value: {}", err as i32)
}
}
