Macro for checking and displaying Vulkan results

This commit is contained in:
saschawillems 2016-05-08 11:18:39 +02:00
parent 63900a9e06
commit 035a5ab560

View file

@ -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