message: Make sure to enable bufferDeviceAddressCaptureReplay on replay
  * We used to get this 'for free' by serialising our patched device next chains,
  but we no longer do that so we need to enable this bit on replay as well.
diff: @@ -2922,7 +2922,17 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
  }
  else
  {
  - // don't add a new VkPhysicalDeviceVulkan12Features to the pNext chain because if we do we
  + VkPhysicalDeviceBufferDeviceAddressFeaturesKHR *existingKHR =
  + (VkPhysicalDeviceBufferDeviceAddressFeaturesKHR *)FindNextStruct(
  + &createInfo, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR);
  + VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *existingEXT =
  + (VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)FindNextStruct(
  + &createInfo, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT);
  +
  + if(!existingKHR && !existingEXT)
  + {
  + // don't add a new VkPhysicalDeviceVulkan12Features to the pNext chain because if we do
  + // we
  // have to remove any components etc. Instead just add the individual
  // VkPhysicalDeviceBufferDeviceAddressFeaturesKHR
  bufAddrKHRFeatures.bufferDeviceAddress = VK_TRUE;
  @@ -2933,6 +2943,7 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
  }
  }
  }
  + }
  else if(KHRbuffer)
  {
  VkPhysicalDeviceFeatures2 availBase = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2};
  @@ -3008,6 +3019,30 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
  }
  }
  + {
  + VkPhysicalDeviceVulkan12Features *enabledFeaturesVK12 =
  + (VkPhysicalDeviceVulkan12Features *)FindNextStruct(
  + &createInfo, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES);
  + VkPhysicalDeviceBufferDeviceAddressFeatures *bufferAddressFeaturesCoreKHR =
  + (VkPhysicalDeviceBufferDeviceAddressFeatures *)FindNextStruct(
  + &createInfo, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES);
  + VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *bufferAddressFeaturesEXT =
  + (VkPhysicalDeviceBufferDeviceAddressFeaturesEXT *)FindNextStruct(
  + &createInfo, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT);
  +
  + // turn on bufferDeviceAddressCaptureReplay if available, so that a capture that uses it is
  + // safe
  + // to replay. Enabling this without using it is fine.
  + if(enabledFeaturesVK12 && enabledFeaturesVK12->bufferDeviceAddress)
  + enabledFeaturesVK12->bufferDeviceAddressCaptureReplay = VK_TRUE;
  +
  + if(bufferAddressFeaturesCoreKHR)
  + bufferAddressFeaturesCoreKHR->bufferDeviceAddressCaptureReplay = VK_TRUE;
  +
  + if(bufferAddressFeaturesEXT)
  + bufferAddressFeaturesEXT->bufferDeviceAddressCaptureReplay = VK_TRUE;
  + }
  +
  rdcarray<const char *> layerArray(Layers.size());
  for(size_t i = 0; i < Layers.size(); i++)
  layerArray[i] = Layers[i].c_str();
  