file new in Git master
Assert.hMacro MAGNUM_
Contents
- Reference
Defines
- #define MAGNUM_VK_INTERNAL_ASSERT_SUCCESS(call) new in Git master
- Assert that a Vulkan function call succeeds.
- #define MAGNUM_VK_INTERNAL_ASSERT_SUCCESS_OR(result, call) new in Git master
- Assert that a Vulkan function call succeeds or returns the specified result.
Define documentation
#define MAGNUM_VK_INTERNAL_ASSERT_SUCCESS(call) new in Git master
Assert that a Vulkan function call succeeds.
Compared to using CORRADE_call == VK_SUCCESS
, this macro also prints the result value. Otherwise the behavior is the same, including interactions with CORRADE_
You can override this implementation by placing your own #define MAGNUM_VK_INTERNAL_ASSERT_SUCCESS
before including the Magnum/
#define MAGNUM_VK_INTERNAL_ASSERT_SUCCESS_OR(result, call) new in Git master
Assert that a Vulkan function call succeeds or returns the specified result.
A variant of MAGNUM_result
in addition to Vk::result
is directly the (unscoped) enum value and the macro returns the actual result value. Example usage:
const Vk::Result result = MAGNUM_VK_INTERNAL_ASSERT_SUCCESS_OR(NotReady, vkGetFenceStatus(device, fence)); if(result == Vk::Result::Success) { // signaled } else { // Vk::Result::NotReady, not signaled yet }
Similarly to CORRADE_if
and return
statements. You can override this implementation by placing your own #define MAGNUM_VK_INTERNAL_ASSERT_SUCCESS_OR
before including the Magnum/