Skip to content

Commit

Permalink
Macro VERIFY_VK_RESULT no longer evaluates result twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdriscoll-lunarg committed Feb 7, 2025
1 parent 7716e6b commit 1fe6b67
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/test_apps/common/test_app_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1036,10 +1036,11 @@ VkShaderModule createShaderModule(vkb::DispatchTable const& disp, const std::vec

VkShaderModule readShaderFromFile(vkb::DispatchTable const& disp, const std::string& filename);

#define VERIFY_VK_RESULT(message, result) \
{ \
if (result != VK_SUCCESS) \
throw gfxrecon::test::vulkan_exception(message, result); \
#define VERIFY_VK_RESULT(message, result) \
{ \
VkResult verify_vk_result_result = result; \
if (verify_vk_result_result != VK_SUCCESS) \
throw gfxrecon::test::vulkan_exception(message, verify_vk_result_result); \
}

struct InitInfo
Expand Down

0 comments on commit 1fe6b67

Please sign in to comment.