Diligent Engine  v.2.4.g
Macros
VulkanErrors.hpp File Reference
#include "Errors.hpp"
#include "DebugUtilities.hpp"
#include "VulkanUtilities/VulkanDebug.hpp"

Go to the source code of this file.

Macros

#define CHECK_VK_ERROR(err, ...)
 
#define CHECK_VK_ERROR_AND_THROW(err, ...)
 

Macro Definition Documentation

◆ CHECK_VK_ERROR

#define CHECK_VK_ERROR (   err,
  ... 
)
Value:
{ \
if (err != VK_SUCCESS) \
{ \
Diligent::LogError<false>(/*IsFatal=*/false, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__, "\nVK Error: ", VulkanUtilities::VkResultToString(err)); \
UNEXPECTED("Error"); \
} \
}

◆ CHECK_VK_ERROR_AND_THROW

#define CHECK_VK_ERROR_AND_THROW (   err,
  ... 
)
Value:
{ \
if (err != VK_SUCCESS) \
Diligent::LogError<true>(/*IsFatal=*/false, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__, "\nVK Error Code: ", VulkanUtilities::VkResultToString(err)); \
}
VulkanUtilities::VkResultToString
const char * VkResultToString(VkResult errorCode)
Definition: VulkanDebug.cpp:556