libradv_files += files('radv_wsi_display.c')
endif
+if with_xlib_lease
+ radv_deps += dep_xcb_xrandr
+ radv_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
+endif
+
libvulkan_radeon = shared_library(
'vulkan_radeon',
[libradv_files, radv_entrypoints, radv_extensions_c, vk_format_table_c],
for extension in doc.findall('./extensions/extension[@platform]'):
platform = extension.attrib['platform']
- define = 'VK_USE_PLATFORM_' + platform.upper() + '_KHR'
+ ext = '_KHR'
+ if platform.upper() == 'XLIB_XRANDR':
+ ext = '_EXT'
+ define = 'VK_USE_PLATFORM_' + platform.upper() + ext
for entrypoint in extension.findall('./require/command'):
fullname = entrypoint.attrib['name']
Extension('VK_KHR_multiview', 1, True),
Extension('VK_KHR_display', 23, 'VK_USE_PLATFORM_DISPLAY_KHR'),
Extension('VK_EXT_direct_mode_display', 1, 'VK_USE_PLATFORM_DISPLAY_KHR'),
+ Extension('VK_EXT_acquire_xlib_display', 1, 'VK_USE_PLATFORM_XLIB_XRANDR_EXT'),
Extension('VK_EXT_debug_report', 9, True),
Extension('VK_EXT_depth_range_unrestricted', 1, True),
Extension('VK_EXT_descriptor_indexing', 2, True),
#include "vk_util.h"
/* Convert the VK_USE_PLATFORM_* defines to booleans */
-%for platform in ['ANDROID', 'WAYLAND', 'XCB', 'XLIB', 'DISPLAY']:
-#ifdef VK_USE_PLATFORM_${platform}_KHR
-# undef VK_USE_PLATFORM_${platform}_KHR
-# define VK_USE_PLATFORM_${platform}_KHR true
+%for platform in ['ANDROID_KHR', 'WAYLAND_KHR', 'XCB_KHR', 'XLIB_KHR', 'DISPLAY_KHR', 'XLIB_XRANDR_EXT']:
+#ifdef VK_USE_PLATFORM_${platform}
+# undef VK_USE_PLATFORM_${platform}
+# define VK_USE_PLATFORM_${platform} true
#else
-# define VK_USE_PLATFORM_${platform}_KHR false
+# define VK_USE_PLATFORM_${platform} false
#endif
%endfor
&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 */