New logger

This commit is contained in:
2026-10-04 23:14:17 -07:00
parent b31c120691
commit b6098d4dc6
19 changed files with 191 additions and 170 deletions
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include <cstdio>
#include <cstdlib>
#include <source_location>
#include <vulkan/vulkan.hpp>
inline void vk_check(vk::Result result, std::source_location loc =
std::source_location::current()) {
if (result != vk::Result::eSuccess) {
std::fprintf(stderr, "%s:%u: %s: %s\n", loc.file_name(), loc.line(),
loc.function_name(), vk::to_string(result).c_str());
std::abort();
}
}
inline void vk_check(VkResult result, std::source_location loc =
std::source_location::current()) {
vk_check(static_cast<vk::Result>(result), loc);
}