diff options
author | Keith Packard <[email protected]> | 2018-02-09 07:45:58 -0800 |
---|---|---|
committer | Keith Packard <[email protected]> | 2018-06-19 14:17:46 -0700 |
commit | 46090a642d54d58bbdb851ae62beb5c350101324 (patch) | |
tree | f96ff23010d1fefa7f8b67b6fe56812993345ee0 /src/intel/vulkan/anv_wsi_display.c | |
parent | 7ab1fffcd2a504024b16e408de329f7a94553ecc (diff) |
anv: Add EXT_acquire_xlib_display to anv driver [v3]
This extension adds the ability to borrow an X RandR output for
temporary use directly by a Vulkan application to the anv driver.
v2:
Simplify addition of VK_USE_PLATFORM_XLIB_XRANDR_KHR to
vulkan_wsi_args
Suggested-by: Eric Engestrom <[email protected]>
v3:
Add extension to list in alphabetical order
Suggested-by: Jason Ekstrand <[email protected]>
Signed-off-by: Keith Packard <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_wsi_display.c')
-rw-r--r-- | src/intel/vulkan/anv_wsi_display.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_wsi_display.c b/src/intel/vulkan/anv_wsi_display.c index b7f3ce0a68f..ed679e85e13 100644 --- a/src/intel/vulkan/anv_wsi_display.c +++ b/src/intel/vulkan/anv_wsi_display.c @@ -144,3 +144,33 @@ anv_ReleaseDisplayEXT(VkPhysicalDevice physical_device, &pdevice->wsi_device, display); } + +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT +VkResult +anv_AcquireXlibDisplayEXT(VkPhysicalDevice physical_device, + Display *dpy, + VkDisplayKHR display) +{ + ANV_FROM_HANDLE(anv_physical_device, pdevice, physical_device); + + return wsi_acquire_xlib_display(physical_device, + &pdevice->wsi_device, + dpy, + display); +} + +VkResult +anv_GetRandROutputDisplayEXT(VkPhysicalDevice physical_device, + Display *dpy, + RROutput output, + VkDisplayKHR *display) +{ + ANV_FROM_HANDLE(anv_physical_device, pdevice, physical_device); + + return wsi_get_randr_output_display(physical_device, + &pdevice->wsi_device, + dpy, + output, + display); +} +#endif /* VK_USE_PLATFORM_XLIB_XRANDR_EXT */ |