diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-12-05 13:27:29 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-12-12 10:51:16 -0700 |
| commit | 910833c324d385ad2706bb0c1059bea38151d6d2 (patch) | |
| tree | 2a2e7b5d76447fc8f332f5db8ff7f759b1f8030f /scripts | |
| parent | 69262028cde64d9e45c8052fdf0aeabce40c1355 (diff) | |
| download | usermoji-910833c324d385ad2706bb0c1059bea38151d6d2.tar.xz | |
scripts: Prevent bad dynamic array in vk_helper.py
An extension added some variables which defeat the mechanisms
used by the header-parsing scripts to identify dynamic arrays.
Change-Id: Idcf84f882b13bf5cc3be8b6bb48751db6922e01e
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/vk_helper.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/vk_helper.py b/scripts/vk_helper.py index 0b73526f..d746194c 100755 --- a/scripts/vk_helper.py +++ b/scripts/vk_helper.py @@ -293,7 +293,10 @@ class HeaderFileParser: members = members.strip().split(':', 1)[0] # strip bitfield element (member_type, member_name) = members.rsplit(None, 1) # Store counts to help recognize and size dynamic arrays - if 'count' in member_name.lower() and 'samplecount' != member_name.lower() and 'uint' in member_type: + # Add special case for pObjectEntryCounts -- though it meets the criteria for a 'count', it should not + # replace the previously identified (and correct) objectCount. + # TODO: convert to using vk.xml and avoid parsing the header + if 'count' in member_name.lower() and 'samplecount' != member_name.lower() and 'uint' in member_type and member_name != "pObjectEntryCounts": self.last_struct_count_name = member_name self.struct_dict[struct_type][num] = {} self.struct_dict[struct_type][num]['full_type'] = member_type |
