diff options
author | Jason Ekstrand <[email protected]> | 2018-10-14 21:56:34 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-10-18 09:17:39 -0500 |
commit | 7c65cf98441ae0f03640d2feebb5d0e5a83f2721 (patch) | |
tree | 864e6c89b6788d297ea772f68e59164d003089eb /src/vulkan/wsi/wsi_common.c | |
parent | 7629c00557c135aae4f0cdfbfa31002b43d8b31e (diff) |
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 <[email protected]>
Diffstat (limited to 'src/vulkan/wsi/wsi_common.c')
-rw-r--r-- | src/vulkan/wsi/wsi_common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 1e3c4e0028b..ad4b8c9075e 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -804,6 +804,20 @@ wsi_common_get_surface_present_modes(struct wsi_device *wsi_device, } VkResult +wsi_common_get_present_rectangles(struct wsi_device *wsi_device, + int local_fd, + VkSurfaceKHR _surface, + uint32_t* pRectCount, + VkRect2D* pRects) +{ + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); + struct wsi_interface *iface = wsi_device->wsi[surface->platform]; + + return iface->get_present_rectangles(surface, wsi_device, local_fd, + pRectCount, pRects); +} + +VkResult wsi_common_create_swapchain(struct wsi_device *wsi, VkDevice device, int fd, |