vulkan/wsi/x11: add support to detect if we can support rendering (v3)
authorDave Airlie <airlied@redhat.com>
Sun, 19 Feb 2017 05:27:47 +0000 (15:27 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 20 Feb 2017 02:53:52 +0000 (12:53 +1000)
commit0a44a680ff702bb4488c345db84a35c190be345e
tree96ea720f00a248c704829f38d289d27b4a685915
parent1f6376935bf91aa2e086a66dfe9737d7f4066bee
vulkan/wsi/x11: add support to detect if we can support rendering (v3)

This adds support to radv_GetPhysicalDeviceXlibPresentationSupportKHR
and radv_GetPhysicalDeviceXcbPresentationSupportKHR to check if the
local device file descriptor is compatible with the descriptor
retrieved from the X server via DRI3.

This will stop radv binding to an X server until we have prime
support in place. Hopefully apps use this API before trying
to render things.

v2: drop unneeded function, don't leak memory. (jekstrand)
v3: also check in surface_get_support callback.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 files changed:
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/radv_wsi.c
src/amd/vulkan/radv_wsi_x11.c
src/intel/vulkan/Makefile.am
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/anv_wsi.c
src/intel/vulkan/anv_wsi_x11.c
src/vulkan/wsi/Makefile.am
src/vulkan/wsi/wsi_common.h
src/vulkan/wsi/wsi_common_wayland.c
src/vulkan/wsi/wsi_common_x11.c
src/vulkan/wsi/wsi_common_x11.h