vulkan/wsi: Implement GetPhysicalDevicePresentRectanglesKHR
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 15 Oct 2018 02:56:34 +0000 (21:56 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 18 Oct 2018 14:17:39 +0000 (09:17 -0500)
commit7c65cf98441ae0f03640d2feebb5d0e5a83f2721
tree864e6c89b6788d297ea772f68e59164d003089eb
parent7629c00557c135aae4f0cdfbfa31002b43d8b31e
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 <lionel.g.landwerlin@intel.com>
src/amd/vulkan/radv_wsi.c
src/intel/vulkan/anv_wsi.c
src/vulkan/wsi/wsi_common.c
src/vulkan/wsi/wsi_common.h
src/vulkan/wsi/wsi_common_display.c
src/vulkan/wsi/wsi_common_private.h
src/vulkan/wsi/wsi_common_wayland.c
src/vulkan/wsi/wsi_common_x11.c