VulkanDevice: Hopefully fix init under Vulkan 1.0 drivers

This commit is contained in:
Stenzek 2024-12-31 23:43:38 +10:00
parent f25302c847
commit d69d25431e
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@
#include "common/assert.h"
#include "common/dynamic_library.h"
#include "common/error.h"
#include "common/log.h"
#include <cstdarg>
@ -73,7 +74,7 @@ bool Vulkan::LoadVulkanLibrary(Error* error)
bool required_functions_missing = false;
#define VULKAN_MODULE_ENTRY_POINT(name, required) \
if (!s_vulkan_library.GetSymbol(#name, &name)) \
if (!s_vulkan_library.GetSymbol(#name, &name) && required) \
{ \
ERROR_LOG("Vulkan: Failed to load required module function {}", #name); \
required_functions_missing = true; \
@ -83,6 +84,7 @@ bool Vulkan::LoadVulkanLibrary(Error* error)
if (required_functions_missing)
{
Error::SetStringView(error, "One or more required functions are missing. The log contains more information.");
ResetVulkanLibraryFunctionPointers();
s_vulkan_library.Close();
return false;