kiba-engine
common.h
1 #pragma once
2 
3 #include <vulkan/vulkan.h>
4 
5 #include <kiba/core/log.h>
6 #include <kiba/defines.h>
7 #include <kiba/renderer/shared.h>
8 #include <kiba/renderer/vulkan/context.h>
9 
10 #define VK_CALL_B8(expr) \
11  { \
12  VkResult call_res; \
13  if ((call_res = expr) != VK_SUCCESS) { \
14  KB_ERROR("vulkan call {raw_string} unsuccessful, returned: {i32}", #expr, call_res); \
15  return false; \
16  } \
17  }
18 
19 #define VK_CALL_ASSERT(expr) \
20  { \
21  VkResult call_res; \
22  KB_ASSERT((call_res = expr) == VK_SUCCESS, \
23  "vulkan call " #expr " should have been successful, but returned: {i32}", \
24  call_res); \
25  }
Global typedefs and macros.
Logging system.