anv: Allow presenting via a different GPU
authorAlex Smith <asmith@feralinteractive.com>
Thu, 18 Oct 2018 16:29:37 +0000 (17:29 +0100)
committerAlex Smith <asmith@feralinteractive.com>
Wed, 24 Oct 2018 08:40:02 +0000 (09:40 +0100)
anv_GetPhysicalDeviceSurfaceSupportKHR will already return success for
this, but anv_GetPhysicalDevice{Xcb,Xlib}PresentationSupportKHR do not.
Apps which check for presentation support via the latter (all Feral
Vulkan games at least) will therefore fail.

This allows me to render on an Intel GPU and present to a display
connected to an AMD card (tested HD 530 + Vega 64).

v2: Rebase on current master.

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_wsi_x11.c

index bfa76e88e79937f321ab3a11ca726f9ff35c5889..7a27ceab64fecbfe199b68155852fb9522c311d9 100644 (file)
@@ -41,7 +41,7 @@ VkBool32 anv_GetPhysicalDeviceXcbPresentationSupportKHR(
    return wsi_get_physical_device_xcb_presentation_support(
       &device->wsi_device,
       queueFamilyIndex,
-      false,
+      true,
       connection, visual_id);
 }
 
@@ -56,7 +56,7 @@ VkBool32 anv_GetPhysicalDeviceXlibPresentationSupportKHR(
    return wsi_get_physical_device_xcb_presentation_support(
       &device->wsi_device,
       queueFamilyIndex,
-      false,
+      true,
       XGetXCBConnection(dpy), visualID);
 }