diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-10-26 18:59:06 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-10-26 18:59:06 +0200 |
| commit | cf965d29b9092ea6b56847028dc885b67b1603e0 (patch) | |
| tree | dc2054210d903c5d629f0487e74a58e1b96958c3 /src/macros.h | |
| parent | a5082d2962d621dc7145614d655016c59ddacc5b (diff) | |
Diffstat (limited to 'src/macros.h')
| -rw-r--r-- | src/macros.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/macros.h b/src/macros.h deleted file mode 100644 index 4c1ddf1..0000000 --- a/src/macros.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -* Global macros -* -* Copyright (C) 2018 by Sascha Willems - www.saschawillems.de -* -* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) -*/ - -#pragma once - -#include "vulkan/vulkan.h" - -#if defined(__ANDROID__) -#define VK_CHECK_RESULT(f) \ -{ \ - VkResult res = (f); \ - if (res != VK_SUCCESS) \ - { \ - LOGE("Fatal : VkResult is \" %d \" in %s at line %d", res, __FILE__, __LINE__); \ - assert(res == VK_SUCCESS); \ - } \ -} -#else -#define VK_CHECK_RESULT(f) \ -{ \ - VkResult res = (f); \ - if (res != VK_SUCCESS) \ - { \ - std::cout << "Fatal : VkResult is \"" << res << "\" in " << __FILE__ << " at line " << __LINE__ << std::endl; \ - assert(res == VK_SUCCESS); \ - } \ -} -#endif - -#define GET_INSTANCE_PROC_ADDR(inst, entrypoint) \ -{ \ - fp##entrypoint = reinterpret_cast<PFN_vk##entrypoint>(vkGetInstanceProcAddr(inst, "vk"#entrypoint)); \ - if (fp##entrypoint == NULL) \ - { \ - exit(1); \ - } \ -} - -#define GET_DEVICE_PROC_ADDR(dev, entrypoint) \ -{ \ - fp##entrypoint = reinterpret_cast<PFN_vk##entrypoint>(vkGetDeviceProcAddr(dev, "vk"#entrypoint)); \ - if (fp##entrypoint == NULL) \ - { \ - exit(1); \ - } \ -}
\ No newline at end of file |