Android log output for VK_CHECK_RESULT macro
This commit is contained in:
parent
06af4a0cee
commit
f09993bc15
1 changed files with 13 additions and 1 deletions
|
|
@ -36,6 +36,17 @@
|
|||
#define DEFAULT_FENCE_TIMEOUT 100000000000
|
||||
|
||||
// Macro to check and display Vulkan return results
|
||||
#if defined(__ANDROID__)
|
||||
#define VK_CHECK_RESULT(f) \
|
||||
{ \
|
||||
VkResult res = (f); \
|
||||
if (res != VK_SUCCESS) \
|
||||
{ \
|
||||
LOGE("Fatal : VkResult is \" %s \" in %s at line %d", vkTools::errorString(res).c_str(), __FILE__, __LINE__); \
|
||||
assert(res == VK_SUCCESS); \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define VK_CHECK_RESULT(f) \
|
||||
{ \
|
||||
VkResult res = (f); \
|
||||
|
|
@ -44,7 +55,8 @@
|
|||
std::cout << "Fatal : VkResult is \"" << vkTools::errorString(res) << "\" in " << __FILE__ << " at line " << __LINE__ << std::endl; \
|
||||
assert(res == VK_SUCCESS); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace vkTools
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue