aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2017-03-06 08:59:14 -0700
committerMark Lobodzinski <mark@lunarg.com>2017-03-07 14:59:59 -0700
commit99a84ff51900bed5b20063080e3d5415659eb1b1 (patch)
tree7454429804f4ddde558fb3f2880e47a6442f4039 /scripts
parent90586fba571f124e920adc082a72451395ffcb7f (diff)
downloadusermoji-99a84ff51900bed5b20063080e3d5415659eb1b1.tar.xz
scripts: Allow safe_structs to handle KHR extensions
Deep copies are needed for some of the new extensions. Change-Id: I7e77fe30a87129aa720225ae16eb87cdba8e626e
Diffstat (limited to 'scripts')
-rw-r--r--scripts/helper_file_generator.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/helper_file_generator.py b/scripts/helper_file_generator.py
index 97fde4be..2e7c7b2d 100644
--- a/scripts/helper_file_generator.py
+++ b/scripts/helper_file_generator.py
@@ -525,9 +525,18 @@ class HelperFileOutputGenerator(OutputGenerator):
# safe_struct source -- create bodies of safe struct helper functions
def GenerateSafeStructSource(self):
safe_struct_body = []
+ wsi_structs = ['VkXlibSurfaceCreateInfoKHR',
+ 'VkXcbSurfaceCreateInfoKHR',
+ 'VkWaylandSurfaceCreateInfoKHR',
+ 'VkMirSurfaceCreateInfoKHR',
+ 'VkAndroidSurfaceCreateInfoKHR',
+ 'VkWin32SurfaceCreateInfoKHR'
+ ]
for item in self.structMembers:
if self.NeedSafeStruct(item) == False:
continue
+ if item.name in wsi_structs:
+ continue
if item.ifdef_protect != None:
safe_struct_body.append("#ifdef %s\n" % item.ifdef_protect)
ss_name = "safe_%s" % item.name
@@ -583,7 +592,7 @@ class HelperFileOutputGenerator(OutputGenerator):
m_type = 'safe_%s' % member.type
if member.ispointer and 'safe_' not in m_type and self.TypeContainsObjectHandle(member.type, False) == False:
# Ptr types w/o a safe_struct, for non-null case need to allocate new ptr and copy data in
- if 'KHR' in ss_name or m_type in ['void', 'char']:
+ if m_type in ['void', 'char']:
# For these exceptions just copy initial value over for now
init_list += '\n %s(in_struct->%s),' % (member.name, member.name)
init_func_txt += ' %s = in_struct->%s;\n' % (member.name, member.name)