Macro for checking and displaying Vulkan results
This commit is contained in:
parent
63900a9e06
commit
035a5ab560
1 changed files with 11 additions and 0 deletions
|
|
@ -34,6 +34,17 @@
|
|||
// Default fence timeout in nanoseconds
|
||||
#define DEFAULT_FENCE_TIMEOUT 100000000000
|
||||
|
||||
// Macro to check and display Vulkan return results
|
||||
#define VK_CHECK_RESULT(f) \
|
||||
{ \
|
||||
VkResult res = (f); \
|
||||
if (res != VK_SUCCESS) \
|
||||
{ \
|
||||
std::cout << "Fatal : VkResult is \"" << vkTools::errorString(res) << "\" in " << __FILE__ << " at line " << __LINE__ << std::endl; \
|
||||
assert(res == VK_SUCCESS); \
|
||||
} \
|
||||
} \
|
||||
|
||||
namespace vkTools
|
||||
{
|
||||
// Check if extension is globally available
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue