anv: Allow presenting via a different GPU

Submitted by Alex Smith on Oct. 18, 2018, 4:37 p.m.

Details

Message ID 20181018163742.9841-1-asmith@feralinteractive.com
State New
Headers show
Series "anv: Allow presenting via a different GPU" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Alex Smith Oct. 18, 2018, 4:37 p.m.
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).

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
---
 src/intel/vulkan/anv_wsi_x11.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
index 2feb5f1337..d23cedb316 100644
--- a/src/intel/vulkan/anv_wsi_x11.c
+++ b/src/intel/vulkan/anv_wsi_x11.c
@@ -42,7 +42,7 @@  VkBool32 anv_GetPhysicalDeviceXcbPresentationSupportKHR(
       &device->wsi_device,
       &device->instance->alloc,
       queueFamilyIndex,
-      device->local_fd, false,
+      device->local_fd, true,
       connection, visual_id);
 }
 
@@ -58,7 +58,7 @@  VkBool32 anv_GetPhysicalDeviceXlibPresentationSupportKHR(
       &device->wsi_device,
       &device->instance->alloc,
       queueFamilyIndex,
-      device->local_fd, false,
+      device->local_fd, true,
       XGetXCBConnection(dpy), visualID);
 }