From 7c65cf98441ae0f03640d2feebb5d0e5a83f2721 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sun, 14 Oct 2018 21:56:34 -0500 Subject: vulkan/wsi: Implement GetPhysicalDevicePresentRectanglesKHR This got missed during 1.1 enabling because it was defined as an interaction between device groups and WSI and it wasn't obvious it was in the delta. The idea behind it is that it's supposed to provide a hint to the application in a multi-GPU setup to indicate which regions of the screen are being scanned out by which GPU so a multi-device split-screen rendering application can render each part of the screen on the GPU that will be presenting it and avoid extra bus traffic between GPUs. On a single-GPU setup or one which doesn't support this present mode, we need to do something. We choose to return the window size (or a max-size rect) if the compositor, X server, or crtc is associated with the given physical device and zero rectangles otherwise. Reviewed-by: Lionel Landwerlin --- src/vulkan/wsi/wsi_common_private.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/vulkan/wsi/wsi_common_private.h') diff --git a/src/vulkan/wsi/wsi_common_private.h b/src/vulkan/wsi/wsi_common_private.h index accc1170163..d8290b69331 100644 --- a/src/vulkan/wsi/wsi_common_private.h +++ b/src/vulkan/wsi/wsi_common_private.h @@ -118,6 +118,11 @@ struct wsi_interface { VkResult (*get_present_modes)(VkIcdSurfaceBase *surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); + VkResult (*get_present_rectangles)(VkIcdSurfaceBase *surface, + struct wsi_device *wsi_device, + int local_fd, + uint32_t* pRectCount, + VkRect2D* pRects); VkResult (*create_swapchain)(VkIcdSurfaceBase *surface, VkDevice device, struct wsi_device *wsi_device, -- cgit v1.2.3