MCPcopy Create free account
hub / github.com/SaschaWillems/HowToVulkan / chkSwapchain

Function chkSwapchain

source/main.cpp:93–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 }
92}
93static 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}
103static inline void chk(bool result) {
104 if (!result) {
105 std::cerr << "Call returned an error\n";

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected