From: David Pinedo Date: Thu, 21 Jul 2016 16:56:27 +0000 (-0600) Subject: misc: Support for cross-platform trace/replay X-Git-Tag: upstream/1.1.92~2815 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3fd30f1e9afc1e391f62d9106a9faa6d17d5823;p=platform%2Fupstream%2FVulkan-Tools.git misc: Support for cross-platform trace/replay Change-Id: If77890356911fa90d22af28a449a05284ad2097f --- diff --git a/vulkan.py b/vulkan.py index ea78e64..8b081f1 100644 --- a/vulkan.py +++ b/vulkan.py @@ -1268,31 +1268,35 @@ lunarg_debug_report = Extension( import sys -if len(sys.argv) > 3: -# TODO : Need to clean this up to more seemlessly handle building different targets than the platform you're on - if sys.platform.startswith('win32') and sys.argv[1] != 'Android': - extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display] - extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display, 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, ext_khr_xlib_surface, ext_khr_wayland_surface, ext_khr_mir_surface, ext_khr_display] - 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, ext_khr_display, 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] +if sys.argv[1] == 'AllPlatforms': + extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_xcb_surface, ext_khr_xlib_surface, ext_khr_wayland_surface, ext_khr_mir_surface, ext_khr_display, ext_khr_android_surface] + extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_xcb_surface, ext_khr_xlib_surface, ext_khr_wayland_surface, ext_khr_mir_surface, ext_khr_display, ext_khr_android_surface, lunarg_debug_report] + else : - if sys.argv[1] == 'Win32': - extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display] - extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display, lunarg_debug_report] - 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' or sys.argv[1] == 'Xlib' or sys.argv[1] == 'Wayland' or sys.argv[1] == 'Mir' or sys.argv[1] == 'Display': - 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, ext_khr_display] - 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, ext_khr_display, lunarg_debug_report] - else: - print('Error: Undefined DisplayServer') - extensions = [] - extensions_all = [] + if len(sys.argv) > 3: + if sys.platform.startswith('win32') and sys.argv[1] != 'Android': + extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display] + extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display, 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, ext_khr_xlib_surface, ext_khr_wayland_surface, ext_khr_mir_surface, ext_khr_display] + 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, ext_khr_display, 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] + else : + if sys.argv[1] == 'Win32': + extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display] + extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display, lunarg_debug_report] + 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' or sys.argv[1] == 'Xlib' or sys.argv[1] == 'Wayland' or sys.argv[1] == 'Mir' or sys.argv[1] == 'Display': + 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, ext_khr_display] + 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, ext_khr_display, lunarg_debug_report] + else: + print('Error: Undefined DisplayServer') + extensions = [] + extensions_all = [] object_dispatch_list = [ "VkInstance",