anv: Add EXT_direct_mode_display to anv driver [v2]
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.

v2: Add extension to list in alphabetical order

Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_extensions.py
src/intel/vulkan/anv_wsi_display.c

index c3c9933b9f8a04e48883b7c515f5c7090657d97b..ab0ab2c6a0a4caaa23fd474dd5147a4e16fffa62 100644 (file)
@@ -111,6 +111,7 @@ EXTENSIONS = [
     Extension('VK_KHR_multiview',                         1, True),
     Extension('VK_KHR_display',                          23, 'VK_USE_PLATFORM_DISPLAY_KHR'),
     Extension('VK_EXT_debug_report',                      8, True),
+    Extension('VK_EXT_direct_mode_display',               1, 'VK_USE_PLATFORM_DISPLAY_KHR'),
     Extension('VK_EXT_external_memory_dma_buf',           1, True),
     Extension('VK_EXT_global_priority',                   1,
               'device->has_context_priority'),
index 35aff11dfd2e8d608c5f48823bc992657e723d92..b7f3ce0a68ff61979163af86cbd3bc5c19ec2720 100644 (file)
@@ -133,3 +133,14 @@ anv_CreateDisplayPlaneSurfaceKHR(
 
    return wsi_create_display_surface(_instance, alloc, create_info, surface);
 }
+
+VkResult
+anv_ReleaseDisplayEXT(VkPhysicalDevice physical_device,
+                       VkDisplayKHR     display)
+{
+   ANV_FROM_HANDLE(anv_physical_device, pdevice, physical_device);
+
+   return wsi_release_display(physical_device,
+                              &pdevice->wsi_device,
+                              display);
+}