diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-08-29 11:56:02 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-08-31 13:27:14 -0600 |
| commit | 6f40998c0cce447d76fc78e4c5d9aa328a62597f (patch) | |
| tree | a4bb35e60e6cb07d4ff17bddc3ab4094871ed7d8 | |
| parent | 0ee5429b80f377b9feb5ad6d23c29e20e95eb07e (diff) | |
| download | usermoji-6f40998c0cce447d76fc78e4c5d9aa328a62597f.tar.xz | |
layers: Update vulkan.py for new extension APIs
Added extension protos and update extension lists for
VK_AMD_draw_indirect_count, VK_NV_external_memory_capabilities,
and VK_NV_external_memory_win32 new for header version 1.0.25.
Change-Id: Ifac0a2b4b7e36a8f907622e002ec419cc7c54f87
| -rw-r--r-- | vulkan.py | 85 |
1 files changed, 70 insertions, 15 deletions
@@ -1020,6 +1020,62 @@ core = Extension( ], ) +ext_amd_extension_draw_indirect_count = Extension( + name="VK_AMD_draw_indirect_count", + headers=["vulkan/vulkan.h"], + objects=[], + protos=[ + Proto("void", "CmdDrawIndirectCountAMD", + [Param("VkCommandBuffer", "commandBuffer"), + Param("VkBuffer", "buffer"), + Param("VkDeviceSize", "offset"), + Param("VkBuffer", "countBuffer"), + Param("VkDeviceSize", "countBufferOffset"), + Param("uint32_t", "maxDrawCount"), + Param("uint32_t", "stride")]), + + Proto("void", "CmdDrawIndexedIndirectCountAMD", + [Param("VkCommandBuffer", "commandBuffer"), + Param("VkBuffer", "buffer"), + Param("VkDeviceSize", "offset"), + Param("VkBuffer", "countBuffer"), + Param("VkDeviceSize", "countBufferOffset"), + Param("uint32_t", "maxDrawCount"), + Param("uint32_t", "stride")]), + ], +) + +ext_nv_external_memory_capabilities = Extension( + name="VK_NV_external_memory_capabilities", + headers=["vulkan/vulkan.h"], + objects=[], + protos=[ + Proto("VkResult", "GetPhysicalDeviceExternalImageFormatPropertiesNV", + [Param("VkPhysicalDevice", "physicalDevice"), + Param("VkFormat", "format"), + Param("VkImageType", "type"), + Param("VkImageTiling", "tiling"), + Param("VkImageUsageFlags", "usage"), + Param("VkImageCreateFlags", "flags"), + Param("vkExternalMemoryHandleTypeFlagsNV", "externalHandleType"), + Param("VkExternalImageFormatPropertiesNV*", "pExternalImageFormatProperties")]), + ], +) + +ext_nv_external_memory_win32 = Extension( + name="VK_NV_external_memory_win32", + headers=["vulkan/vulkan.h"], + objects=[], + ifdef="VK_USE_PLATFORM_WIN32_KHR", + protos=[ + Proto("VkResult", "GetMemoryWin32HandleNV", + [Param("VkDevice", "device"), + Param("VkDeviceMemory", "memory"), + Param("VkExternalMemoryHandleTypeFlagsNV", "handleType"), + Param("HANDLE*", "pHandle")]), + ], +) + ext_khr_surface = Extension( name="VK_KHR_surface", headers=["vulkan/vulkan.h"], @@ -1271,30 +1327,29 @@ lunarg_debug_report = Extension( import sys 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] - + 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, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities, ext_nv_external_memory_win32] + 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, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities, ext_nv_external_memory_win32, lunarg_debug_report] else : 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] + extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities, ext_nv_external_memory_win32] + extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities, ext_nv_external_memory_win32, 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] + 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, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities] + 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, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities, 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] + extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_android_surface, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities] + extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_android_surface, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities, 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] + extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities, ext_nv_external_memory_win32] + extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_win32_surface, ext_khr_display, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities, ext_nv_external_memory_win32, 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] + extensions = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_android_surface, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities] + extensions_all = [core, ext_khr_surface, ext_khr_device_swapchain, ext_khr_android_surface, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities, 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] + 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, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities] + 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, ext_amd_extension_draw_indirect_count, ext_nv_external_memory_capabilities] else: print('Error: Undefined DisplayServer') extensions = [] |
