diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-06-28 14:46:14 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-07-03 14:00:45 -0600 |
| commit | bb572db9778ddc02162043e397de4c587ea93b85 (patch) | |
| tree | 4a439e5e4e223d1bcd8dfd05ec5198c73a089fe8 /scripts/parameter_validation_generator.py | |
| parent | ab3bf2238c154013dc5fb229b5689a482e97b04a (diff) | |
| download | usermoji-bb572db9778ddc02162043e397de4c587ea93b85.tar.xz | |
layers: Add VUIDS to allocator checks
Change-Id: If4c37b631de1564dc56bcb1aa69e356538618acb
Diffstat (limited to 'scripts/parameter_validation_generator.py')
| -rw-r--r-- | scripts/parameter_validation_generator.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/parameter_validation_generator.py b/scripts/parameter_validation_generator.py index 86cb7c18..38b0d882 100644 --- a/scripts/parameter_validation_generator.py +++ b/scripts/parameter_validation_generator.py @@ -835,6 +835,14 @@ class ParamCheckerOutputGenerator(OutputGenerator): # Function pointers need a reinterpret_cast to void* ptr_required_vuid = self.GetVuid("VUID-%s-%s-parameter" % (vuid_tag_name, value.name)) if value.type[:4] == 'PFN_': + allocator_dict = {'pfnAllocation': '002004f0', + 'pfnReallocation': '002004f2', + 'pfnFree': '002004f4', + 'pfnInternalAllocation': '002004f6' + } + vuid = allocator_dict.get(value.name) + if vuid is not None: + ptr_required_vuid = 'VALIDATION_ERROR_%s' % vuid checkExpr.append('skipCall |= validate_required_pointer(layer_data->report_data, "{}", {ppp}"{}"{pps}, reinterpret_cast<const void*>({}{}), {});\n'.format(funcPrintName, valuePrintName, prefix, value.name, ptr_required_vuid, **postProcSpec)) else: checkExpr.append('skipCall |= validate_required_pointer(layer_data->report_data, "{}", {ppp}"{}"{pps}, {}{}, {});\n'.format(funcPrintName, valuePrintName, prefix, value.name, ptr_required_vuid, **postProcSpec)) |
