radv: Add EXT_direct_mode_display to radv driver
authorKeith Packard <keithp@keithp.com>
Fri, 9 Feb 2018 15:38:32 +0000 (07:38 -0800)
committerKeith Packard <keithp@keithp.com>
Tue, 19 Jun 2018 21:17:46 +0000 (14:17 -0700)
Add support for the EXT_direct_mode_display extension. This just
provides the vkReleaseDisplayEXT function.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/radv_wsi_display.c

index 6f4fc71bfd8077b3a97f217e1cd5806544f12813..fc545ce25806c1bf04bf4ce51321ec471036d8c1 100644 (file)
@@ -87,6 +87,7 @@ EXTENSIONS = [
     Extension('VK_KHR_xlib_surface',                      6, 'VK_USE_PLATFORM_XLIB_KHR'),
     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_debug_report',                      9, True),
     Extension('VK_EXT_depth_range_unrestricted',          1, True),
     Extension('VK_EXT_descriptor_indexing',               2, True),
index 048d992e1cf2adf0918515a5b3aca0e920f1b979..68a38cf122ca402ba97de87c807264180c589fff 100644 (file)
@@ -153,3 +153,14 @@ radv_CreateDisplayPlaneSurfaceKHR(
        return wsi_create_display_surface(_instance, alloc,
                                          create_info, surface);
 }
+
+VkResult
+radv_ReleaseDisplayEXT(VkPhysicalDevice physical_device,
+                      VkDisplayKHR     display)
+{
+       RADV_FROM_HANDLE(radv_physical_device, pdevice, physical_device);
+
+       return wsi_release_display(physical_device,
+                                  &pdevice->wsi_device,
+                                  display);
+}