aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Schultz <karl@lunarg.com>2016-01-27 16:03:49 -0700
committerKarl Schultz <karl@lunarg.com>2016-01-27 16:03:49 -0700
commit5129bb61d7d0fd321a4a007c8a509a22d5c4091f (patch)
tree2dc7cb093986e503080898b3804aa00475b9e5e8
parentc2dc03298abc11ac7fdcd27417691cea9eb773f1 (diff)
downloadusermoji-5129bb61d7d0fd321a4a007c8a509a22d5c4091f.tar.xz
vktrace: fixes to allow vktrace/replay to work with Hologram
- Protect strlen() against NULL strings - Avoid freeing remapped semaphores in replay QueuePresent before using them - Use a VkMemory total size instead of the literal VK_WHOLE_SIZE in trace buffers
-rwxr-xr-xvk_helper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/vk_helper.py b/vk_helper.py
index fd5c96e0..ea0b8e71 100755
--- a/vk_helper.py
+++ b/vk_helper.py
@@ -1358,7 +1358,7 @@ class StructWrapperGen:
sh_funcs.append('%sstructSize += pStruct->%s*sizeof(%s);' % (indent, self.struct_dict[s][m]['array_size'], self.struct_dict[s][m]['type']))
elif self.struct_dict[s][m]['ptr'] and 'pNext' != self.struct_dict[s][m]['name']:
if 'char' in self.struct_dict[s][m]['type'].lower():
- sh_funcs.append('%sstructSize += sizeof(%s)*(1+strlen(pStruct->%s));' % (indent, self.struct_dict[s][m]['type'], self.struct_dict[s][m]['name']))
+ sh_funcs.append('%sstructSize += (pStruct->%s != NULL) ? sizeof(%s)*(1+strlen(pStruct->%s)) : 0;' % (indent, self.struct_dict[s][m]['name'], self.struct_dict[s][m]['type'], self.struct_dict[s][m]['name']))
elif is_type(self.struct_dict[s][m]['type'], 'struct'):
sh_funcs.append('%sstructSize += %s(pStruct->%s);' % (indent, self._get_size_helper_func_name(self.struct_dict[s][m]['type']), self.struct_dict[s][m]['name']))
elif 'void' not in self.struct_dict[s][m]['type'].lower():