Flutter Engine
The Flutter Engine
vulkan_interface.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/vulkan/procs/vulkan_interface.h"
6
7namespace vulkan {
8
10 switch (result) {
11 case VK_SUCCESS:
12 return "VK_SUCCESS";
13 case VK_NOT_READY:
14 return "VK_NOT_READY";
15 case VK_TIMEOUT:
16 return "VK_TIMEOUT";
17 case VK_EVENT_SET:
18 return "VK_EVENT_SET";
19 case VK_EVENT_RESET:
20 return "VK_EVENT_RESET";
21 case VK_INCOMPLETE:
22 return "VK_INCOMPLETE";
24 return "VK_ERROR_OUT_OF_HOST_MEMORY";
26 return "VK_ERROR_OUT_OF_DEVICE_MEMORY";
28 return "VK_ERROR_INITIALIZATION_FAILED";
30 return "VK_ERROR_DEVICE_LOST";
32 return "VK_ERROR_MEMORY_MAP_FAILED";
34 return "VK_ERROR_LAYER_NOT_PRESENT";
36 return "VK_ERROR_EXTENSION_NOT_PRESENT";
38 return "VK_ERROR_FEATURE_NOT_PRESENT";
40 return "VK_ERROR_INCOMPATIBLE_DRIVER";
42 return "VK_ERROR_TOO_MANY_OBJECTS";
44 return "VK_ERROR_FORMAT_NOT_SUPPORTED";
46 return "VK_ERROR_FRAGMENTED_POOL";
48 return "VK_ERROR_SURFACE_LOST_KHR";
50 return "VK_ERROR_NATIVE_WINDOW_IN_USE_KHR";
52 return "VK_SUBOPTIMAL_KHR";
54 return "VK_ERROR_OUT_OF_DATE_KHR";
56 return "VK_ERROR_INCOMPATIBLE_DISPLAY_KHR";
58 return "VK_ERROR_VALIDATION_FAILED_EXT";
60 return "VK_ERROR_INVALID_SHADER_NV";
61#if VK_HEADER_VERSION < 140
62 case VK_RESULT_RANGE_SIZE:
63 return "VK_RESULT_RANGE_SIZE";
64#endif
66 return "VK_RESULT_MAX_ENUM";
68 return "VK_ERROR_INVALID_EXTERNAL_HANDLE";
70 return "VK_ERROR_OUT_OF_POOL_MEMORY";
71 default:
72 return "Unknown Error";
73 }
74 return "";
75}
76
77} // namespace vulkan
GAsyncResult * result
std::string VulkanResultToString(VkResult result)
VkResult
Definition: vulkan_core.h:140
@ VK_ERROR_VALIDATION_FAILED_EXT
Definition: vulkan_core.h:170
@ VK_ERROR_INVALID_SHADER_NV
Definition: vulkan_core.h:171
@ VK_SUBOPTIMAL_KHR
Definition: vulkan_core.h:167
@ VK_ERROR_EXTENSION_NOT_PRESENT
Definition: vulkan_core.h:153
@ VK_INCOMPLETE
Definition: vulkan_core.h:146
@ VK_ERROR_INVALID_EXTERNAL_HANDLE
Definition: vulkan_core.h:161
@ VK_ERROR_DEVICE_LOST
Definition: vulkan_core.h:150
@ VK_SUCCESS
Definition: vulkan_core.h:141
@ VK_EVENT_SET
Definition: vulkan_core.h:144
@ VK_EVENT_RESET
Definition: vulkan_core.h:145
@ VK_ERROR_OUT_OF_HOST_MEMORY
Definition: vulkan_core.h:147
@ VK_ERROR_INITIALIZATION_FAILED
Definition: vulkan_core.h:149
@ VK_ERROR_INCOMPATIBLE_DISPLAY_KHR
Definition: vulkan_core.h:169
@ VK_ERROR_OUT_OF_DEVICE_MEMORY
Definition: vulkan_core.h:148
@ VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
Definition: vulkan_core.h:166
@ VK_ERROR_OUT_OF_DATE_KHR
Definition: vulkan_core.h:168
@ VK_TIMEOUT
Definition: vulkan_core.h:143
@ VK_ERROR_FORMAT_NOT_SUPPORTED
Definition: vulkan_core.h:157
@ VK_ERROR_FRAGMENTED_POOL
Definition: vulkan_core.h:158
@ VK_ERROR_SURFACE_LOST_KHR
Definition: vulkan_core.h:165
@ VK_NOT_READY
Definition: vulkan_core.h:142
@ VK_ERROR_FEATURE_NOT_PRESENT
Definition: vulkan_core.h:154
@ VK_ERROR_TOO_MANY_OBJECTS
Definition: vulkan_core.h:156
@ VK_RESULT_MAX_ENUM
Definition: vulkan_core.h:198
@ VK_ERROR_MEMORY_MAP_FAILED
Definition: vulkan_core.h:151
@ VK_ERROR_LAYER_NOT_PRESENT
Definition: vulkan_core.h:152
@ VK_ERROR_INCOMPATIBLE_DRIVER
Definition: vulkan_core.h:155
@ VK_ERROR_OUT_OF_POOL_MEMORY
Definition: vulkan_core.h:160