| 91 | } |
| 92 | } |
| 93 | static inline void chkSwapchain(VkResult result) { |
| 94 | if (result < VK_SUCCESS) { |
| 95 | if (result == VK_ERROR_OUT_OF_DATE_KHR) { |
| 96 | updateSwapchain = true; |
| 97 | return; |
| 98 | } |
| 99 | std::cerr << "Vulkan call returned an error (" << result << ")\n"; |
| 100 | exit(result); |
| 101 | } |
| 102 | } |
| 103 | static inline void chk(bool result) { |
| 104 | if (!result) { |
| 105 | std::cerr << "Call returned an error\n"; |