diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2015-08-11 09:35:02 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2015-08-11 10:11:38 -0600 |
| commit | def1170071d3e66ce4501c2f0db5dbfd39fcb9c5 (patch) | |
| tree | 2f15b98dfdba6ae2999abd80b1f6984aea22bae2 | |
| parent | f861ba523896c3719cadff74687c3aa8664e8500 (diff) | |
| download | usermoji-def1170071d3e66ce4501c2f0db5dbfd39fcb9c5.tar.xz | |
layers: Handle uninitialized QueueFamily values in APIDump
If queueFamilyCount or pQueueFamilyIndices were uninitialized, APIDump
would persist in printing this info resulting in a segfault. Added
check for sharingMode before examining these values.
| -rwxr-xr-x | vk_helper.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vk_helper.py b/vk_helper.py index 906c9162..cc28cd02 100755 --- a/vk_helper.py +++ b/vk_helper.py @@ -835,6 +835,9 @@ class StructWrapperGen: if not idx_ss_decl: sh_funcs.append('%sstringstream index_ss;' % (indent)) idx_ss_decl = True + if (stp_list[index]['name'] == 'pQueueFamilyIndices'): + sh_funcs.append('%sif (pStruct->sharingMode == VK_SHARING_MODE_CONCURRENT) {' % (indent)) + indent += ' ' sh_funcs.append('%sif (pStruct->%s) {' % (indent, stp_list[index]['name'])) indent += ' ' sh_funcs.append('%sfor (uint32_t i = 0; i < %s; i++) {' % (indent, array_count)) @@ -872,6 +875,10 @@ class StructWrapperGen: sh_funcs.append('%s}' % (indent)) indent = indent[4:] sh_funcs.append('%s}' % (indent)) + #endif + if (stp_list[index]['name'] == 'pQueueFamilyIndices'): + indent = indent[4:] + sh_funcs.append('%s}' % (indent)) elif (stp_list[index]['ptr']): sh_funcs.append('%s' % lineinfo.get()) sh_funcs.append('%sif (pStruct->%s) {' % (indent, stp_list[index]['name'])) |
