diff options
author | Simon Ser <contact@emersion.fr> | 2022-10-18 16:57:00 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-10-18 16:57:00 +0200 |
commit | 9e5ad7a84516c0497e3887e14962af1cdd1da1cf (patch) | |
tree | 2882eb3b7fca05900ef0ab022a2070d3feed68d3 /render/vulkan | |
parent | b475190327ee7109c01ee952f41fd17e93b12f76 (diff) |
render/vulkan: add missing entries in vulkan_strerror()
And update the sort order to follow Khronos' <vulkan/vulkan_core.h>.
Diffstat (limited to 'render/vulkan')
-rw-r--r-- | render/vulkan/util.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/render/vulkan/util.c b/render/vulkan/util.c index b15c57eb..8c803d8b 100644 --- a/render/vulkan/util.c +++ b/render/vulkan/util.c @@ -20,7 +20,7 @@ int vulkan_find_mem_type(struct wlr_vk_device *dev, } const char *vulkan_strerror(VkResult err) { - #define ERR_STR(r) case VK_ ##r: return #r +#define ERR_STR(r) case VK_ ##r: return #r switch (err) { ERR_STR(SUCCESS); ERR_STR(NOT_READY); @@ -28,7 +28,6 @@ const char *vulkan_strerror(VkResult err) { ERR_STR(EVENT_SET); ERR_STR(EVENT_RESET); ERR_STR(INCOMPLETE); - ERR_STR(SUBOPTIMAL_KHR); ERR_STR(ERROR_OUT_OF_HOST_MEMORY); ERR_STR(ERROR_OUT_OF_DEVICE_MEMORY); ERR_STR(ERROR_INITIALIZATION_FAILED); @@ -40,19 +39,24 @@ const char *vulkan_strerror(VkResult err) { ERR_STR(ERROR_INCOMPATIBLE_DRIVER); ERR_STR(ERROR_TOO_MANY_OBJECTS); ERR_STR(ERROR_FORMAT_NOT_SUPPORTED); + ERR_STR(ERROR_FRAGMENTED_POOL); + ERR_STR(ERROR_UNKNOWN); + ERR_STR(ERROR_OUT_OF_POOL_MEMORY); + ERR_STR(ERROR_INVALID_EXTERNAL_HANDLE); + ERR_STR(ERROR_FRAGMENTATION); + ERR_STR(ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS); + ERR_STR(PIPELINE_COMPILE_REQUIRED); ERR_STR(ERROR_SURFACE_LOST_KHR); ERR_STR(ERROR_NATIVE_WINDOW_IN_USE_KHR); + ERR_STR(SUBOPTIMAL_KHR); ERR_STR(ERROR_OUT_OF_DATE_KHR); - ERR_STR(ERROR_FRAGMENTED_POOL); ERR_STR(ERROR_INCOMPATIBLE_DISPLAY_KHR); ERR_STR(ERROR_VALIDATION_FAILED_EXT); - ERR_STR(ERROR_INVALID_EXTERNAL_HANDLE); - ERR_STR(ERROR_OUT_OF_POOL_MEMORY); ERR_STR(ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT); default: return "<unknown>"; } - #undef ERR_STR +#undef ERR_STR } void vulkan_change_layout_queue(VkCommandBuffer cb, VkImage img, |