aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/vk-command-buffer.hpp2
-rw-r--r--include/vk-utils.hpp12
2 files changed, 10 insertions, 4 deletions
diff --git a/include/vk-command-buffer.hpp b/include/vk-command-buffer.hpp
index f82e52f..96bc7be 100644
--- a/include/vk-command-buffer.hpp
+++ b/include/vk-command-buffer.hpp
@@ -56,8 +56,6 @@ struct command_buffer {
VkCommandBuffer vk_command_buffer;
QueueType queue_type;
-
- // TODO: Add relevant fields in order to bind heaps
};
// General purpose queue
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,