Debian Codegraph @

tests/framework/generated/vk_result_to_string_helper.h

raw
1 #pragma once
2 // *** THIS FILE IS GENERATED - DO NOT EDIT ***
3 // See vk_result_to_string_generator.py for modifications
4
5 /*
6 * Copyright (c) 2025 The Khronos Group Inc.
7 * Copyright (c) 2025 Valve Corporation
8 * Copyright (c) 2025 LunarG, Inc.
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 *
22
23 */
24
25 #include <ostream>
26 #include <string>
27
28 #include <vulkan/vulkan.h>
29
30 inline std::ostream& operator<<(std::ostream& os, const VkResult& result) {
31 switch (result) {
32 case (VK_SUCCESS):
33 return os << "VK_SUCCESS";
34 case (VK_NOT_READY):
35 return os << "VK_NOT_READY";
36 case (VK_TIMEOUT):
37 return os << "VK_TIMEOUT";
38 case (VK_EVENT_SET):
39 return os << "VK_EVENT_SET";
40 case (VK_EVENT_RESET):
41 return os << "VK_EVENT_RESET";
42 case (VK_INCOMPLETE):
43 return os << "VK_INCOMPLETE";
44 case (VK_ERROR_OUT_OF_HOST_MEMORY):
45 return os << "VK_ERROR_OUT_OF_HOST_MEMORY";
46 case (VK_ERROR_OUT_OF_DEVICE_MEMORY):
47 return os << "VK_ERROR_OUT_OF_DEVICE_MEMORY";
48 case (VK_ERROR_INITIALIZATION_FAILED):
49 return os << "VK_ERROR_INITIALIZATION_FAILED";
50 case (VK_ERROR_DEVICE_LOST):
51 return os << "VK_ERROR_DEVICE_LOST";
52 case (VK_ERROR_MEMORY_MAP_FAILED):
53 return os << "VK_ERROR_MEMORY_MAP_FAILED";
54 case (VK_ERROR_LAYER_NOT_PRESENT):
55 return os << "VK_ERROR_LAYER_NOT_PRESENT";
56 case (VK_ERROR_EXTENSION_NOT_PRESENT):
57 return os << "VK_ERROR_EXTENSION_NOT_PRESENT";
58 case (VK_ERROR_FEATURE_NOT_PRESENT):
59 return os << "VK_ERROR_FEATURE_NOT_PRESENT";
60 case (VK_ERROR_INCOMPATIBLE_DRIVER):
61 return os << "VK_ERROR_INCOMPATIBLE_DRIVER";
62 case (VK_ERROR_TOO_MANY_OBJECTS):
63 return os << "VK_ERROR_TOO_MANY_OBJECTS";
64 case (VK_ERROR_FORMAT_NOT_SUPPORTED):
65 return os << "VK_ERROR_FORMAT_NOT_SUPPORTED";
66 case (VK_ERROR_FRAGMENTED_POOL):
67 return os << "VK_ERROR_FRAGMENTED_POOL";
68 case (VK_ERROR_UNKNOWN):
69 return os << "VK_ERROR_UNKNOWN";
70 case (VK_ERROR_VALIDATION_FAILED):
71 return os << "VK_ERROR_VALIDATION_FAILED";
72 case (VK_ERROR_OUT_OF_POOL_MEMORY):
73 return os << "VK_ERROR_OUT_OF_POOL_MEMORY";
74 case (VK_ERROR_INVALID_EXTERNAL_HANDLE):
75 return os << "VK_ERROR_INVALID_EXTERNAL_HANDLE";
76 case (VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS):
77 return os << "VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS";
78 case (VK_ERROR_FRAGMENTATION):
79 return os << "VK_ERROR_FRAGMENTATION";
80 case (VK_PIPELINE_COMPILE_REQUIRED):
81 return os << "VK_PIPELINE_COMPILE_REQUIRED";
82 case (VK_ERROR_NOT_PERMITTED):
83 return os << "VK_ERROR_NOT_PERMITTED";
84 case (VK_ERROR_SURFACE_LOST_KHR):
85 return os << "VK_ERROR_SURFACE_LOST_KHR";
86 case (VK_ERROR_NATIVE_WINDOW_IN_USE_KHR):
87 return os << "VK_ERROR_NATIVE_WINDOW_IN_USE_KHR";
88 case (VK_SUBOPTIMAL_KHR):
89 return os << "VK_SUBOPTIMAL_KHR";
90 case (VK_ERROR_OUT_OF_DATE_KHR):
91 return os << "VK_ERROR_OUT_OF_DATE_KHR";
92 case (VK_ERROR_INCOMPATIBLE_DISPLAY_KHR):
93 return os << "VK_ERROR_INCOMPATIBLE_DISPLAY_KHR";
94 case (VK_ERROR_INVALID_SHADER_NV):
95 return os << "VK_ERROR_INVALID_SHADER_NV";
96 case (VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR):
97 return os << "VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR";
98 case (VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR):
99 return os << "VK_ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR";
100 case (VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR):
101 return os << "VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR";
102 case (VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR):
103 return os << "VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR";
104 case (VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR):
105 return os << "VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR";
106 case (VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR):
107 return os << "VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR";
108 case (VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT):
109 return os << "VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT";
110 case (VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT):
111 return os << "VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT";
112 case (VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT):
113 return os << "VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT";
114 case (VK_THREAD_IDLE_KHR):
115 return os << "VK_THREAD_IDLE_KHR";
116 case (VK_THREAD_DONE_KHR):
117 return os << "VK_THREAD_DONE_KHR";
118 case (VK_OPERATION_DEFERRED_KHR):
119 return os << "VK_OPERATION_DEFERRED_KHR";
120 case (VK_OPERATION_NOT_DEFERRED_KHR):
121 return os << "VK_OPERATION_NOT_DEFERRED_KHR";
122 case (VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR):
123 return os << "VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR";
124 case (VK_ERROR_COMPRESSION_EXHAUSTED_EXT):
125 return os << "VK_ERROR_COMPRESSION_EXHAUSTED_EXT";
126 case (VK_INCOMPATIBLE_SHADER_BINARY_EXT):
127 return os << "VK_INCOMPATIBLE_SHADER_BINARY_EXT";
128 case (VK_PIPELINE_BINARY_MISSING_KHR):
129 return os << "VK_PIPELINE_BINARY_MISSING_KHR";
130 case (VK_ERROR_NOT_ENOUGH_SPACE_KHR):
131 return os << "VK_ERROR_NOT_ENOUGH_SPACE_KHR";
132 default:
133 return os << static_cast<int32_t>(result);
134 }
135 }