1 // This file is auto-generated by vulkano autogen from vk.xml header version 1.3.238.
2 // It should not be edited manually. Changes should be made by editing autogen.
3 
4 #[doc = r" An enumeration of runtime errors that can be returned by Vulkan."]
5 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
6 #[repr(i32)]
7 #[non_exhaustive]
8 pub enum VulkanError {
9     OutOfHostMemory,
10     OutOfDeviceMemory,
11     InitializationFailed,
12     DeviceLost,
13     MemoryMapFailed,
14     LayerNotPresent,
15     ExtensionNotPresent,
16     FeatureNotPresent,
17     IncompatibleDriver,
18     TooManyObjects,
19     FormatNotSupported,
20     FragmentedPool,
21     Unknown,
22     OutOfPoolMemory,
23     InvalidExternalHandle,
24     Fragmentation,
25     InvalidOpaqueCaptureAddress,
26     IncompatibleDisplay,
27     NotPermitted,
28     SurfaceLost,
29     NativeWindowInUse,
30     OutOfDate,
31     ImageUsageNotSupported,
32     VideoPictureLayoutNotSupported,
33     VideoProfileOperationNotSupported,
34     VideoProfileFormatNotSupported,
35     VideoProfileCodecNotSupported,
36     VideoStdVersionNotSupported,
37     ValidationFailed,
38     FullScreenExclusiveModeLost,
39     CompressionExhausted,
40     InvalidDrmFormatModifierPlaneLayout,
41     InvalidShader,
42     Unnamed(ash::vk::Result),
43 }
44 impl From<ash::vk::Result> for VulkanError {
from(val: ash::vk::Result) -> VulkanError45     fn from(val: ash::vk::Result) -> VulkanError {
46         match val {
47             ash::vk::Result::ERROR_OUT_OF_HOST_MEMORY => Self::OutOfHostMemory,
48             ash::vk::Result::ERROR_OUT_OF_DEVICE_MEMORY => Self::OutOfDeviceMemory,
49             ash::vk::Result::ERROR_INITIALIZATION_FAILED => Self::InitializationFailed,
50             ash::vk::Result::ERROR_DEVICE_LOST => Self::DeviceLost,
51             ash::vk::Result::ERROR_MEMORY_MAP_FAILED => Self::MemoryMapFailed,
52             ash::vk::Result::ERROR_LAYER_NOT_PRESENT => Self::LayerNotPresent,
53             ash::vk::Result::ERROR_EXTENSION_NOT_PRESENT => Self::ExtensionNotPresent,
54             ash::vk::Result::ERROR_FEATURE_NOT_PRESENT => Self::FeatureNotPresent,
55             ash::vk::Result::ERROR_INCOMPATIBLE_DRIVER => Self::IncompatibleDriver,
56             ash::vk::Result::ERROR_TOO_MANY_OBJECTS => Self::TooManyObjects,
57             ash::vk::Result::ERROR_FORMAT_NOT_SUPPORTED => Self::FormatNotSupported,
58             ash::vk::Result::ERROR_FRAGMENTED_POOL => Self::FragmentedPool,
59             ash::vk::Result::ERROR_UNKNOWN => Self::Unknown,
60             ash::vk::Result::ERROR_OUT_OF_POOL_MEMORY => Self::OutOfPoolMemory,
61             ash::vk::Result::ERROR_INVALID_EXTERNAL_HANDLE => Self::InvalidExternalHandle,
62             ash::vk::Result::ERROR_FRAGMENTATION => Self::Fragmentation,
63             ash::vk::Result::ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS => {
64                 Self::InvalidOpaqueCaptureAddress
65             }
66             ash::vk::Result::ERROR_INCOMPATIBLE_DISPLAY_KHR => Self::IncompatibleDisplay,
67             ash::vk::Result::ERROR_NOT_PERMITTED_KHR => Self::NotPermitted,
68             ash::vk::Result::ERROR_SURFACE_LOST_KHR => Self::SurfaceLost,
69             ash::vk::Result::ERROR_NATIVE_WINDOW_IN_USE_KHR => Self::NativeWindowInUse,
70             ash::vk::Result::ERROR_OUT_OF_DATE_KHR => Self::OutOfDate,
71             ash::vk::Result::ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR => Self::ImageUsageNotSupported,
72             ash::vk::Result::ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR => {
73                 Self::VideoPictureLayoutNotSupported
74             }
75             ash::vk::Result::ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR => {
76                 Self::VideoProfileOperationNotSupported
77             }
78             ash::vk::Result::ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR => {
79                 Self::VideoProfileFormatNotSupported
80             }
81             ash::vk::Result::ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR => {
82                 Self::VideoProfileCodecNotSupported
83             }
84             ash::vk::Result::ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR => {
85                 Self::VideoStdVersionNotSupported
86             }
87             ash::vk::Result::ERROR_VALIDATION_FAILED_EXT => Self::ValidationFailed,
88             ash::vk::Result::ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT => {
89                 Self::FullScreenExclusiveModeLost
90             }
91             ash::vk::Result::ERROR_COMPRESSION_EXHAUSTED_EXT => Self::CompressionExhausted,
92             ash::vk::Result::ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT => {
93                 Self::InvalidDrmFormatModifierPlaneLayout
94             }
95             ash::vk::Result::ERROR_INVALID_SHADER_NV => Self::InvalidShader,
96             x => Self::Unnamed(x),
97         }
98     }
99 }
100