layers: Include all 4 Linux WSI interfaces
authorTony Barbour <tony@LunarG.com>
Tue, 12 Apr 2016 19:35:51 +0000 (13:35 -0600)
committerTony Barbour <tony@LunarG.com>
Wed, 13 Apr 2016 21:33:04 +0000 (15:33 -0600)
Change-Id: I20b0d64c90e6da940f45b31abf0330b2a415655d

CMakeLists.txt
vk-layer-generate.py
vulkan.py

index 35610fe..46940fb 100755 (executable)
@@ -21,7 +21,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
     #   TODO: Basic support is present for Xlib but is untested.
     #         Mir support is stubbed in but unimplemented and untested.
     option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
-    option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" OFF)
+    option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
     option(BUILD_WSI_WAYLAND_SUPPORT "Build Wayland WSI support" OFF)
     option(BUILD_WSI_MIR_SUPPORT "Build Mir WSI support" OFF)
 
index 2d04e2e..205f2bc 100755 (executable)
@@ -1541,7 +1541,10 @@ class UniqueObjectsSubcommand(Subcommand):
         # TODO : This is hacky, need to make this a more general-purpose solution for all layers
         ifdef_dict = {'CreateXcbSurfaceKHR': 'VK_USE_PLATFORM_XCB_KHR',
                       'CreateAndroidSurfaceKHR': 'VK_USE_PLATFORM_ANDROID_KHR',
-                      'CreateWin32SurfaceKHR': 'VK_USE_PLATFORM_WIN32_KHR'}
+                      'CreateWin32SurfaceKHR': 'VK_USE_PLATFORM_WIN32_KHR',
+                      'CreateXlibSurfaceKHR': 'VK_USE_PLATFORM_XLIB_KHR',
+                      'CreateWaylandSurfaceKHR': 'VK_USE_PLATFORM_WAYLAND_KHR',
+                      'CreateMirSurfaceKHR': 'VK_USE_PLATFORM_MIR_KHR'}
         # Give special treatment to create functions that return multiple new objects
         # This dict stores array name and size of array
         custom_create_dict = {'pDescriptorSets' : 'pAllocateInfo->descriptorSetCount'}
index 11d196a..ea4040e 100755 (executable)
--- a/vulkan.py
+++ b/vulkan.py
@@ -1233,8 +1233,8 @@ if len(sys.argv) > 3:
         extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface]
         extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, lunarg_debug_report]
     elif sys.platform.startswith('linux') and sys.argv[1] != 'Android':
-        extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xcb_surface]
-        extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xcb_surface, lunarg_debug_report]
+        extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xcb_surface, ext_khr_xlib_surface, ext_khr_wayland_surface, ext_khr_mir_surface]
+        extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xcb_surface, ext_khr_xlib_surface, ext_khr_wayland_surface, ext_khr_mir_surface, lunarg_debug_report]
     else: # android
         extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_android_surface]
         extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_android_surface, lunarg_debug_report]
@@ -1245,18 +1245,9 @@ else :
     elif sys.argv[1] == 'Android':
         extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_android_surface]
         extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_android_surface, lunarg_debug_report]
-    elif sys.argv[1] == 'Xcb':
-        extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xcb_surface]
-        extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xcb_surface, lunarg_debug_report]
-    elif sys.argv[1] == 'Xlib':
-        extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xlib_surface]
-        extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xlib_surface, lunarg_debug_report]
-    elif sys.argv[1] == 'Wayland':
-        extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_wayland_surface]
-        extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_wayland_surface, lunarg_debug_report]
-    elif sys.argv[1] == 'Mir':
-        extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_mir_surface]
-        extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_mir_surface, lunarg_debug_report]
+    elif sys.argv[1] == 'Xcb' or sys.argv[1] == 'Xlib' or sys.argv[1] == 'Wayland' or sys.argv[1] == 'Mir':
+        extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xcb_surface, ext_khr_xlib_surface, ext_khr_wayland_surface, ext_khr_mir_surface]
+        extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_xcb_surface, ext_khr_xlib_surface, ext_khr_wayland_surface, ext_khr_mir_surface, lunarg_debug_report]
     else:
         print('Error: Undefined DisplayServer')
         extensions = []