diff options
Diffstat (limited to 'src/renderer/backends/vulkan_helpers.h')
-rw-r--r-- | src/renderer/backends/vulkan_helpers.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/renderer/backends/vulkan_helpers.h b/src/renderer/backends/vulkan_helpers.h index 3465aed..4bd02f1 100644 --- a/src/renderer/backends/vulkan_helpers.h +++ b/src/renderer/backends/vulkan_helpers.h @@ -21,7 +21,12 @@ static void plat_get_required_extension_names(cstr_darray* extensions) { // TODO(omni): port to using internal assert functions #define VK_CHECK(vulkan_expr) \ - { assert(vulkan_expr == VK_SUCCESS); } + do { \ + VkResult res = vulkan_expr; \ + if (res != VK_SUCCESS) { \ + ERROR_EXIT("Vulkan error: %u", res); \ + } \ + } while (0) // TODO: typedef struct vk_debugger {} vk_debugger; |