message: vulkan: Assert that graphics-QF is present-QF
diff: @@ -266,41 +266,13 @@ static void getPresentationQueue(VulkanContext& mContext, VulkanSwapChain& sc) {
  VkBool32 supported = VK_FALSE;
  vkGetPhysicalDeviceSurfaceSupportKHR(mContext.physicalDevice, mContext.graphicsQueueFamilyIndex,
  sc.surface, &supported);
  - if (supported) {
  - presentQueueFamilyIndex = mContext.graphicsQueueFamilyIndex;
  - }
  - // Otherwise fall back to separate graphics and presentation queues.
  - if (presentQueueFamilyIndex == 0xffff) {
  - for (uint32_t j = 0; j < queueFamiliesCount; ++j) {
  - vkGetPhysicalDeviceSurfaceSupportKHR(mContext.physicalDevice, j, sc.surface, &supported);
  - if (supported) {
  - presentQueueFamilyIndex = j;
  - break;
  - }
  - }
  - }
  - ASSERT_POSTCONDITION(presentQueueFamilyIndex != 0xffff,
  - "This physical device does not support the presentation queue.");
  - if (mContext.graphicsQueueFamilyIndex != presentQueueFamilyIndex) {
  -
  - // TODO: Strictly speaking, this code path is incorrect. However it is not triggered on any
  - // Android devices that we've tested with, nor with MoltenVK.
  - //
  - // This is incorrect because we created the logical device early on, before we had a handle
  - // to the rendering surface. Therefore the device was not created with the presentation
  - // queue family index included in VkDeviceQueueCreateInfo.
  - //
  - // This is non-trivial to fix because the driver API allows clients to do certain things
  - // (e.g. upload a vertex buffer) before the swap chain is created.
  - //
  + // We assume that the chosen graphics queues are able to present. See also
  // https://github.com/google/filament/issues/1532
  - vkGetDeviceQueue(mContext.device, presentQueueFamilyIndex, 0, &sc.presentQueue);
  + ASSERT_POSTCONDITION(supported, "Graphics queues do not support presentation.");
  - } else {
  + presentQueueFamilyIndex = mContext.graphicsQueueFamilyIndex;
  sc.presentQueue = mContext.graphicsQueue;
  - }
  - ASSERT_POSTCONDITION(sc.presentQueue, "Unable to obtain presentation queue.");
  sc.headlessQueue = VK_NULL_HANDLE;
  }
  