From 8f4f7f571f1aba2ffe0b5b3267e0e1475e105f60 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 8 Feb 2022 17:45:31 +0000 Subject: [PATCH] KHR_synchronization2 is only enabled if the feature is enabled --- .../driver/vulkan/wrappers/vk_device_funcs.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp index 23c5ae18d..833136faa 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp @@ -2178,6 +2178,8 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi VkPhysicalDeviceDescriptorIndexingFeatures descIndexingFeatures = {}; VkPhysicalDeviceVulkan12Features vulkan12Features = {}; + VkPhysicalDeviceVulkan13Features vulkan13Features = {}; + VkPhysicalDeviceSynchronization2Features sync2 = {}; if(ObjDisp(physicalDevice)->GetPhysicalDeviceFeatures2) { @@ -2269,6 +2271,8 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi BEGIN_PHYS_EXT_CHECK(VkPhysicalDeviceVulkan13Features, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES); { + vulkan13Features = *ext; + CHECK_PHYS_EXT_FEATURE(robustImageAccess); CHECK_PHYS_EXT_FEATURE(inlineUniformBlock); CHECK_PHYS_EXT_FEATURE(descriptorBindingInlineUniformBlockUpdateAfterBind); @@ -2764,6 +2768,8 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi BEGIN_PHYS_EXT_CHECK(VkPhysicalDeviceSynchronization2Features, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES); { + sync2 = *ext; + CHECK_PHYS_EXT_FEATURE(synchronization2); } END_PHYS_EXT_CHECK(); @@ -3436,6 +3442,15 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi } } + // we also need to check for feature enablement - if an extension is promoted that doesn't mean + // it's enabled + + if(m_EnabledExtensions.ext_KHR_synchronization2) + { + if(!vulkan13Features.synchronization2 && !sync2.synchronization2) + m_EnabledExtensions.ext_KHR_synchronization2 = false; + } + InitInstanceExtensionTables(m_Instance, &m_EnabledExtensions); InitDeviceExtensionTables(device, &m_EnabledExtensions);