aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Elliott <ianelliott@google.com>2015-12-11 15:03:05 -0700
committerJon Ashburn <jon@lunarg.com>2015-12-29 14:41:58 -0700
commit95ea7dcd62218abb04868b48ed816d520b9e8ef2 (patch)
tree7f2829dd0764f9228c8360bcf3869cbde4af724a
parentde54cb5e6d93225d5267745c643c099b6cb786a4 (diff)
downloadusermoji-95ea7dcd62218abb04868b48ed816d520b9e8ef2.tar.xz
layers: Version 217 WSI changes.
-rwxr-xr-xvk_helper.py37
-rwxr-xr-xvulkan.py6
2 files changed, 36 insertions, 7 deletions
diff --git a/vk_helper.py b/vk_helper.py
index 92a21c08..be0ba408 100755
--- a/vk_helper.py
+++ b/vk_helper.py
@@ -815,8 +815,17 @@ class StructWrapperGen:
# XXX - REMOVE this comment
lineinfo = sourcelineinfo()
sh_funcs.append('%s' % lineinfo.get())
+ exclude_struct_list = ['VkAndroidSurfaceCreateInfoKHR',
+ 'VkMirSurfaceCreateInfoKHR',
+ 'VkWaylandSurfaceCreateInfoKHR',
+ 'VkXlibSurfaceCreateInfoKHR']
+ if sys.platform == 'win32':
+ exclude_struct_list.append('VkXcbSurfaceCreateInfoKHR')
+ else:
+ exclude_struct_list.append('VkWin32SurfaceCreateInfoKHR')
for s in sorted(self.struct_dict):
- sh_funcs.append('string %s(const %s* pStruct, const string prefix);' % (self._get_sh_func_name(s), typedef_fwd_dict[s]))
+ if (typedef_fwd_dict[s] not in exclude_struct_list):
+ sh_funcs.append('string %s(const %s* pStruct, const string prefix);' % (self._get_sh_func_name(s), typedef_fwd_dict[s]))
sh_funcs.append('\n')
sh_funcs.append('%s' % lineinfo.get())
for s in sorted(self.struct_dict):
@@ -828,6 +837,8 @@ class StructWrapperGen:
# TODO: This is a tmp workaround
if 'ppActiveLayerNames' not in self.struct_dict[s][m]['name']:
stp_list.append(self.struct_dict[s][m])
+ if (typedef_fwd_dict[s] in exclude_struct_list):
+ continue
sh_funcs.append('%s' % lineinfo.get())
sh_funcs.append('string %s(const %s* pStruct, const string prefix)\n{' % (self._get_sh_func_name(s), typedef_fwd_dict[s]))
sh_funcs.append('%s' % lineinfo.get())
@@ -1194,10 +1205,21 @@ class StructWrapperGen:
def _generateValidateHelperFunctions(self):
sh_funcs = []
# We do two passes, first pass just generates prototypes for all the functsions
+ exclude_struct_list = ['VkAndroidSurfaceCreateInfoKHR',
+ 'VkMirSurfaceCreateInfoKHR',
+ 'VkWaylandSurfaceCreateInfoKHR',
+ 'VkXlibSurfaceCreateInfoKHR']
+ if sys.platform == 'win32':
+ exclude_struct_list.append('VkXcbSurfaceCreateInfoKHR')
+ else:
+ exclude_struct_list.append('VkWin32SurfaceCreateInfoKHR')
for s in sorted(self.struct_dict):
- sh_funcs.append('uint32_t %s(const %s* pStruct);' % (self._get_vh_func_name(s), typedef_fwd_dict[s]))
+ if (typedef_fwd_dict[s] not in exclude_struct_list):
+ sh_funcs.append('uint32_t %s(const %s* pStruct);' % (self._get_vh_func_name(s), typedef_fwd_dict[s]))
sh_funcs.append('\n')
for s in sorted(self.struct_dict):
+ if (typedef_fwd_dict[s] in exclude_struct_list):
+ continue
sh_funcs.append('uint32_t %s(const %s* pStruct)\n{' % (self._get_vh_func_name(s), typedef_fwd_dict[s]))
for m in sorted(self.struct_dict[s]):
# TODO : Need to handle arrays of enums like in VkRenderPassCreateInfo struct
@@ -1226,8 +1248,17 @@ class StructWrapperGen:
def _generateSizeHelperFunctions(self):
sh_funcs = []
# just generates prototypes for all the functions
+ exclude_struct_list = ['VkAndroidSurfaceCreateInfoKHR',
+ 'VkMirSurfaceCreateInfoKHR',
+ 'VkWaylandSurfaceCreateInfoKHR',
+ 'VkXlibSurfaceCreateInfoKHR']
+ if sys.platform == 'win32':
+ exclude_struct_list.append('VkXcbSurfaceCreateInfoKHR')
+ else:
+ exclude_struct_list.append('VkWin32SurfaceCreateInfoKHR')
for s in sorted(self.struct_dict):
- sh_funcs.append('size_t %s(const %s* pStruct);' % (self._get_size_helper_func_name(s), typedef_fwd_dict[s]))
+ if (typedef_fwd_dict[s] not in exclude_struct_list):
+ sh_funcs.append('size_t %s(const %s* pStruct);' % (self._get_size_helper_func_name(s), typedef_fwd_dict[s]))
return "\n".join(sh_funcs)
diff --git a/vulkan.py b/vulkan.py
index eeb20ea7..adb83245 100755
--- a/vulkan.py
+++ b/vulkan.py
@@ -1088,8 +1088,7 @@ ext_khr_xcb_surface = Extension(
protos=[
Proto("VkResult", "CreateXcbSurfaceKHR",
[Param("VkInstance", "instance"),
- Param("xcb_connection_t*", "connection"),
- Param("xcb_window_t", "window"),
+ Param("const VkXcbSurfaceCreateInfoKHR*", "pCreateInfo"),
Param("const VkAllocationCallbacks*", "pAllocator"),
Param("VkSurfaceKHR*", "pSurface")]),
@@ -1107,8 +1106,7 @@ ext_khr_win32_surface = Extension(
protos=[
Proto("VkResult", "CreateWin32SurfaceKHR",
[Param("VkInstance", "instance"),
- Param("HINSTANCE", "hinstance"),
- Param("HWND", "hwnd"),
+ Param("const VkWin32SurfaceCreateInfoKHR*", "pCreateInfo"),
Param("const VkAllocationCallbacks*", "pAllocator"),
Param("VkSurfaceKHR*", "pSurface")]),