vulkan: Add win32 and xcb extensions to vulkan.py
authorMark Lobodzinski <mark@lunarg.com>
Tue, 24 Nov 2015 21:03:18 +0000 (14:03 -0700)
committerJon Ashburn <jon@lunarg.com>
Tue, 1 Dec 2015 17:18:24 +0000 (10:18 -0700)
Conflicts:
vulkan.py

loader/vk-loader-generate.py
vulkan.py

index 0fc1446..99fe595 100755 (executable)
@@ -379,6 +379,10 @@ class WinDefFileSubcommand(Subcommand):
         for proto in self.protos:
             if self.exports and proto.name not in self.exports:
                 continue
+#           This was intended to reject WSI calls, but actually rejects ALL extensions
+#           TODO:  Make this WSI-extension specific
+#           if proto.name.endswith("KHR"):
+#               continue
             body.append("   vk" + proto.name)
 
         return "\n".join(body)
index 2f2a28f..5564091 100755 (executable)
--- a/vulkan.py
+++ b/vulkan.py
@@ -1080,6 +1080,43 @@ ext_khr_device_swapchain = Extension(
              Param("const VkPresentInfoKHR*", "pPresentInfo")]),
     ],
 )
+
+ext_khr_xcb_surface = Extension(
+    name="VK_KHR_xcb_surface",
+    headers=["vulkan/vulkan.h"],
+    objects=[],
+    protos=[
+        Proto("VkResult", "CreateXcbSurfaceKHR",
+            [Param("VkInstance", "instance"),
+             Param("xcb_connection_t*", "connection"),
+             Param("xcb_window_t", "window"),
+             Param("const VkAllocationCallbacks*", "pAllocator"),
+             Param("VkSurfaceKHR*", "pSurface")]),
+
+        Proto("VkBool32", "GetPhysicalDeviceXcbPresentationSupportKHR",
+            [Param("    VkPhysicalDevice", "physicalDevice"),
+             Param("    uint32_t", "queueFamilyIndex"),
+             Param("    xcb_connection_t*", "connection"),
+             Param("    xcb_visualid_t", "visual_id")]),
+    ],
+)
+ext_khr_win32_surface = Extension(
+    name="VK_KHR_win32_surface",
+    headers=["vulkan/vulkan.h"],
+    objects=[],
+    protos=[
+        Proto("VkResult", "CreateWin32SurfaceKHR",
+            [Param("VkInstance", "instance"),
+             Param("HINSTANCE", "hinstance"),
+             Param("HWND", "hwnd"),
+             Param("const VkAllocationCallbacks*", "pAllocator"),
+             Param("VkSurfaceKHR*", "pSurface")]),
+
+        Proto("VkBool32", "GetPhysicalDeviceWin32PresentationSupportKHR",
+            [Param("    VkPhysicalDevice", "physicalDevice"),
+             Param("    uint32_t", "queueFamilyIndex")]),
+    ],
+)
 lunarg_debug_report = Extension(
     name="VK_LUNARG_DEBUG_REPORT",
     headers=["vk_lunarg_debug_report.h"],