aboutsummaryrefslogtreecommitdiffstats
path: root/include/vk-utils.hpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2026-08-24 23:46:12 +0200
committerladevieq <ladevie.quentin@gmail.com>2026-08-24 23:46:12 +0200
commitc85ca6648401a32c4bda6ae4cc571614e53e71ce (patch)
treea72c6aead6c5380845fdb8ab2d231bc2965afd36 /include/vk-utils.hpp
parentd7fb64a1b127e76200359bf5505df64c04cb33ca (diff)
Fix some descriptor heap usage errors
Change VKCHECK macro
Diffstat (limited to 'include/vk-utils.hpp')
-rw-r--r--include/vk-utils.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/vk-utils.hpp b/include/vk-utils.hpp
index c67cf31..094c5db 100644
--- a/include/vk-utils.hpp
+++ b/include/vk-utils.hpp
@@ -1,9 +1,17 @@
#pragma once
#ifdef DEBUG
-#define VKCHECK(result) assert((result) == VK_SUCCESS)
+#define VK_CHECK(expr) \
+ do { \
+ VkResult res = expr; \
+ if (res < VK_SUCCESS) { \
+ printf("%s returned error code : %d", #expr, res); \
+ __debugbreak(); \
+ } \
+ } \
+ while(0);
#else
-#define VKCHECK(result) (void)result
+#define VK_CHECK(expr) (void)expr
#endif
VKAPI_ATTR VkBool32 VKAPI_CALL debug_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,