vk: only destroy surface if instance and surface aren't null

Don't request Arm debug layer VK_LAYER_ARM_AGA
Fix for MINIDUMP-5G
This commit is contained in:
Flyinghead 2023-01-23 12:11:43 +01:00
parent 2b14c3e605
commit aa79196d38
1 changed files with 3 additions and 3 deletions

View File

@ -439,9 +439,8 @@ bool VulkanContext::InitDevice()
features.fragmentStoresAndAtomics = true;
if (samplerAnisotropy)
features.samplerAnisotropy = true;
const char *layers[] = { "VK_LAYER_ARM_AGA" };
device = physicalDevice.createDeviceUnique(vk::DeviceCreateInfo(vk::DeviceCreateFlags(), deviceQueueCreateInfo,
layers, deviceExtensions, &features));
nullptr, deviceExtensions, &features));
#if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
VULKAN_HPP_DEFAULT_DISPATCHER.init(*device);
@ -1016,7 +1015,8 @@ void VulkanContext::term()
#ifndef USE_SDL
surface.reset();
#else
instance->destroySurfaceKHR(surface.release());
if (instance && surface)
instance->destroySurfaceKHR(surface.release());
#endif
pipelineCache.reset();
device.reset();