Added a failsafe for list gpus
All checks were successful
Build VulkanEngine / build (push) Successful in 4m35s

This commit is contained in:
Alexandre 2026-09-30 23:48:55 +02:00
parent 3a80180add
commit 98c4594885

View File

@ -7,6 +7,7 @@
// Currently rewriting render images
// Todo:
// Switch C style types to C++ ones (vk::)
// Switch fs paths from relative to being able to be launched from anywhere
#include "descriptors.h" // Required for public interface custom allocator
#include "Common/Types.h"
@ -2243,6 +2244,11 @@ void Engine::getAvailableGPU() {
.require_api_version(1, 3, 0)
.build();
if (!instRet) {
_logger.logFatal(ENGINE, "Failed to create Vulkan instance for GPU listing: {}", instRet.error().message());
return;
}
vkb::Instance vkbInst = instRet.value();
VkInstance instance = vkbInst.instance;