From 4edd76ed5bee2d5f4408923f145ab47fa67850eb Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 25 Nov 2024 10:39:58 +0000 Subject: [PATCH] Patch BDA feature in 1.2 promoted feature struct query * If BDA capture/replay is not supported we patched the feature query for the vulkan 1.2 struct, but if an application used the promoted KHR extension struct we weren't patching that because it was previously invalid to query on the extension itself. --- .../driver/vulkan/wrappers/vk_get_funcs.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/renderdoc/driver/vulkan/wrappers/vk_get_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_get_funcs.cpp index 3db681c28..422701711 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_get_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_get_funcs.cpp @@ -802,6 +802,24 @@ void WrappedVulkan::vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice } } + // Vulkan 1.2 also promoted the old core extension query. This would have been invalid to use + // before since we would have hidden the extension itself, but on vulkan 1.2 it is valid so we + // intercept it unconditionally + VkPhysicalDeviceBufferDeviceAddressFeatures *bda = + (VkPhysicalDeviceBufferDeviceAddressFeatures *)FindNextStruct( + pFeatures, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES); + + if(bda) + { + if(bda->bufferDeviceAddressCaptureReplay == VK_FALSE) + { + RDCWARN( + "VkPhysicalDeviceBufferDeviceAddressFeatures::bufferDeviceAddressCaptureReplay is false, " + "can't support capture of bufferDeviceAddress"); + bda->bufferDeviceAddress = bda->bufferDeviceAddressMultiDevice = VK_FALSE; + } + } + // we don't want to report support for mesh shaders + multiview VkPhysicalDeviceMeshShaderFeaturesEXT *mesh = (VkPhysicalDeviceMeshShaderFeaturesEXT *)FindNextStruct(