Add a workaround and an assert, trying to fix #18982

Not sure what it is if this doesn't fix #18982.

We already seem to be doing things correctly.
This commit is contained in:
Henrik Rydgård 2024-04-28 14:51:48 +02:00
parent 11112d4043
commit 28ab4518ed
2 changed files with 3 additions and 1 deletions

View file

@ -263,7 +263,7 @@ VkResult VulkanContext::CreateInstance(const CreateInfo &info) {
return res;
}
if (extensionsLookup_.KHR_get_physical_device_properties2) {
if (extensionsLookup_.KHR_get_physical_device_properties2 && vkGetPhysicalDeviceProperties2) {
for (uint32_t i = 0; i < gpu_count; i++) {
VkPhysicalDeviceProperties2 props2{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2};
VkPhysicalDevicePushDescriptorPropertiesKHR pushProps{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR};
@ -291,6 +291,7 @@ VkResult VulkanContext::CreateInstance(const CreateInfo &info) {
}
if (extensionsLookup_.EXT_debug_utils) {
_assert_(vkCreateDebugUtilsMessengerEXT != nullptr);
InitDebugUtilsCallback();
}

View file

@ -576,6 +576,7 @@ bool VulkanLoad(std::string *errorStr) {
if (vkCreateInstance && vkGetInstanceProcAddr && vkGetDeviceProcAddr && vkEnumerateInstanceExtensionProperties && vkEnumerateInstanceLayerProperties) {
INFO_LOG(G3D, "VulkanLoad: Base functions loaded.");
// NOTE: It's ok if vkEnumerateInstanceVersion is missing.
return true;
} else {
*errorStr = "Failed to load Vulkan base functions";