diff --git a/include/core/basalt_logger.h b/include/core/basalt_logger.h index b70365d..0a493e4 100644 --- a/include/core/basalt_logger.h +++ b/include/core/basalt_logger.h @@ -60,6 +60,14 @@ void basalt_write(const LOG_LEVEL level, const char* msg, ...); #define BDEBUG(msg, ...) basalt_log(LOG_DEBUG, msg, ##__VA_ARGS__); #define BTRACE(msg, ...) basalt_log(LOG_TRACE, msg, ##__VA_ARGS__); +#define VK_ASSERT(call, msg, ...) \ + if ((err = (call)) == VK_SUCCESS) {} \ + else { \ + BFATAL(msg, __FILE__, __LINE__, string_VkResult(err), ##__VA_ARGS__); \ + debug_break(); \ + exit(-1); \ + } + #define BASSERT_FATAL(cond, msg, ...) \ if (cond){} \ else { \