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.
This commit is contained in:
baldurk
2024-11-25 10:39:58 +00:00
parent 39eb3f1537
commit 4edd76ed5b
@@ -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(