Conditionally enable bufferDeviceAddressCaptureReplay in VK1.2 features

* This struct might be passed without the parent bufferDeviceAddress feature
  being enabled, e.g. if capture replay wasn't supported and we claimed no
  support, or if there's really no support. We can't unconditionally enable
  capture replay like we can with the extension structs (which are only passed
  if the extension is available, and we only allow it to be available if the
  feature is available).
This commit is contained in:
baldurk committed 2020-01-28 18:44:54 +00:00
1 parent 1c764ca518
commit ea0de0c065
1 file changed
+1 -1
@@ -3188,7 +3188,7 @@ VkResult WrappedVulkan::vkCreateDevice(VkPhysicalDevice physicalDevice,
// we must turn on bufferDeviceAddressCaptureReplay. We verified that this feature was available
// before we whitelisted the extension/feature
if(enabledFeaturesVK12)
if(enabledFeaturesVK12 && enabledFeaturesVK12->bufferDeviceAddress)
enabledFeaturesVK12->bufferDeviceAddressCaptureReplay = VK_TRUE;
if(bufferAddressFeaturesCoreKHR)