summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_wsi_display.c
diff options
context:
space:
mode:
authorKeith Packard <[email protected]>2018-02-09 07:45:58 -0800
committerKeith Packard <[email protected]>2018-06-19 14:17:46 -0700
commitdbac8e25f851ed44c51f3ce8a08b2cdd564c5dd2 (patch)
treeb916f34db7b01f7ea88f7e5bf979196d8584c56c /src/amd/vulkan/radv_wsi_display.c
parent46090a642d54d58bbdb851ae62beb5c350101324 (diff)
radv: Add EXT_acquire_xlib_display to radv driver [v2]
This extension adds the ability to borrow an X RandR output for temporary use directly by a Vulkan application to the radv driver. v2: Simplify addition of VK_USE_PLATFORM_XLIB_XRANDR_KHR to vulkan_wsi_args Suggested-by: Eric Engestrom <[email protected]> Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_wsi_display.c')
-rw-r--r--src/amd/vulkan/radv_wsi_display.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_wsi_display.c b/src/amd/vulkan/radv_wsi_display.c
index 68a38cf122c..84431019dbb 100644
--- a/src/amd/vulkan/radv_wsi_display.c
+++ b/src/amd/vulkan/radv_wsi_display.c
@@ -164,3 +164,33 @@ radv_ReleaseDisplayEXT(VkPhysicalDevice physical_device,
&pdevice->wsi_device,
display);
}
+
+#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
+VkResult
+radv_AcquireXlibDisplayEXT(VkPhysicalDevice physical_device,
+ Display *dpy,
+ VkDisplayKHR display)
+{
+ RADV_FROM_HANDLE(radv_physical_device, pdevice, physical_device);
+
+ return wsi_acquire_xlib_display(physical_device,
+ &pdevice->wsi_device,
+ dpy,
+ display);
+}
+
+VkResult
+radv_GetRandROutputDisplayEXT(VkPhysicalDevice physical_device,
+ Display *dpy,
+ RROutput output,
+ VkDisplayKHR *display)
+{
+ RADV_FROM_HANDLE(radv_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 */