diff --git a/renderdoc/driver/vulkan/vk_core.cpp b/renderdoc/driver/vulkan/vk_core.cpp index ec5832b28..b2f0f0c6f 100644 --- a/renderdoc/driver/vulkan/vk_core.cpp +++ b/renderdoc/driver/vulkan/vk_core.cpp @@ -1020,6 +1020,7 @@ void WrappedVulkan::FilterToSupportedExtensions(std::vectorEnumerateDeviceExtensionProperties(Unwrap(physDev), NULL, &numExts, NULL); + vkr = ObjDisp(physDev)->EnumerateDeviceExtensionProperties(Unwrap(physDev), pLayerName, &numExts, + NULL); if(vkr != VK_SUCCESS) return vkr; std::vector exts(numExts); - vkr = ObjDisp(physDev)->EnumerateDeviceExtensionProperties(Unwrap(physDev), NULL, &numExts, + vkr = ObjDisp(physDev)->EnumerateDeviceExtensionProperties(Unwrap(physDev), pLayerName, &numExts, &exts[0]); if(vkr != VK_SUCCESS) @@ -1048,11 +1050,14 @@ VkResult WrappedVulkan::FilterDeviceExtensionProperties(VkPhysicalDevice physDev filtered.reserve(exts.size()); FilterToSupportedExtensions(exts, filtered); - // now we can add extensions that we provide ourselves (note this isn't sorted, but we - // don't have to sort the results, the sorting was just so we could filter optimally). - filtered.insert( - filtered.end(), &renderdocProvidedDeviceExtensions[0], - &renderdocProvidedDeviceExtensions[0] + ARRAY_COUNT(renderdocProvidedDeviceExtensions)); + if(pLayerName == NULL) + { + // now we can add extensions that we provide ourselves (note this isn't sorted, but we + // don't have to sort the results, the sorting was just so we could filter optimally). + filtered.insert( + filtered.end(), &renderdocProvidedDeviceExtensions[0], + &renderdocProvidedDeviceExtensions[0] + ARRAY_COUNT(renderdocProvidedDeviceExtensions)); + } return FillPropertyCountAndList(&filtered[0], (uint32_t)filtered.size(), pPropertyCount, pProperties); @@ -1087,11 +1092,14 @@ VkResult WrappedVulkan::FilterInstanceExtensionProperties( FilterToSupportedExtensions(exts, filtered); - // now we can add extensions that we provide ourselves (note this isn't sorted, but we - // don't have to sort the results, the sorting was just so we could filter optimally). - filtered.insert( - filtered.end(), &renderdocProvidedInstanceExtensions[0], - &renderdocProvidedInstanceExtensions[0] + ARRAY_COUNT(renderdocProvidedInstanceExtensions)); + if(pLayerName == NULL) + { + // now we can add extensions that we provide ourselves (note this isn't sorted, but we + // don't have to sort the results, the sorting was just so we could filter optimally). + filtered.insert( + filtered.end(), &renderdocProvidedInstanceExtensions[0], + &renderdocProvidedInstanceExtensions[0] + ARRAY_COUNT(renderdocProvidedInstanceExtensions)); + } return FillPropertyCountAndList(&filtered[0], (uint32_t)filtered.size(), pPropertyCount, pProperties); diff --git a/renderdoc/driver/vulkan/vk_core.h b/renderdoc/driver/vulkan/vk_core.h index df863cbaa..aa8e6f59b 100644 --- a/renderdoc/driver/vulkan/vk_core.h +++ b/renderdoc/driver/vulkan/vk_core.h @@ -958,7 +958,8 @@ public: static bool IsSupportedExtension(const char *extName); static void FilterToSupportedExtensions(std::vector &exts, std::vector &filtered); - VkResult FilterDeviceExtensionProperties(VkPhysicalDevice physDev, uint32_t *pPropertyCount, + VkResult FilterDeviceExtensionProperties(VkPhysicalDevice physDev, const char *pLayerName, + uint32_t *pPropertyCount, VkExtensionProperties *pProperties); static VkResult FilterInstanceExtensionProperties( const VkEnumerateInstanceExtensionPropertiesChain *pChain, const char *pLayerName, diff --git a/renderdoc/driver/vulkan/vk_layer.cpp b/renderdoc/driver/vulkan/vk_layer.cpp index b997aed0f..e912b0e59 100644 --- a/renderdoc/driver/vulkan/vk_layer.cpp +++ b/renderdoc/driver/vulkan/vk_layer.cpp @@ -240,7 +240,7 @@ VK_LAYER_RENDERDOC_CaptureEnumerateDeviceExtensionProperties(VkPhysicalDevice ph // This is our chance to filter out any reported extensions that we don't support if(physicalDevice != NULL && (pLayerName == NULL || strcmp(pLayerName, RENDERDOC_VULKAN_LAYER_NAME))) return CoreDisp(physicalDevice) - ->FilterDeviceExtensionProperties(physicalDevice, pPropertyCount, pProperties); + ->FilterDeviceExtensionProperties(physicalDevice, pLayerName, pPropertyCount, pProperties); return WrappedVulkan::GetProvidedDeviceExtensionProperties(pPropertyCount, pProperties); }