diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-06-26 13:05:57 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-06-28 10:57:05 -0600 |
| commit | 3e0fa34601ff17f612b58ebd52a586c4630be244 (patch) | |
| tree | 46f80d5fe7e40be2958b9d152f1e850d97ab9c17 /scripts/parameter_validation_generator.py | |
| parent | 2fbde9226361aaed79ca1dc0f63010a5e7af42df (diff) | |
| download | usermoji-3e0fa34601ff17f612b58ebd52a586c4630be244.tar.xz | |
layers: Add VUID parameter to pNext validation
In parameter_validation, plumbed VUID value through to validation
routine, added VUIDs for manual PV functions, updated generator to
compute correct VUID.
Change-Id: Ida15c874ba63826902fe93869cecac87415e0259
Diffstat (limited to 'scripts/parameter_validation_generator.py')
| -rw-r--r-- | scripts/parameter_validation_generator.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/parameter_validation_generator.py b/scripts/parameter_validation_generator.py index 707b258c..57f2edcf 100644 --- a/scripts/parameter_validation_generator.py +++ b/scripts/parameter_validation_generator.py @@ -780,20 +780,21 @@ class ParamCheckerOutputGenerator(OutputGenerator): return checkExpr # # Generate pNext check string - def makeStructNextCheck(self, prefix, value, funcPrintName, valuePrintName, postProcSpec): + def makeStructNextCheck(self, prefix, value, funcPrintName, valuePrintName, postProcSpec, struct_type_name): checkExpr = [] # Generate an array of acceptable VkStructureType values for pNext extStructCount = 0 extStructVar = 'NULL' extStructNames = 'NULL' + vuid = self.GetVuid("VUID-%s-pNext-pNext" % struct_type_name) if value.extstructs: structs = value.extstructs.split(',') checkExpr.append('const VkStructureType allowedStructs[] = {' + ', '.join([self.getStructType(s) for s in structs]) + '};\n') extStructCount = 'ARRAY_SIZE(allowedStructs)' extStructVar = 'allowedStructs' extStructNames = '"' + ', '.join(structs) + '"' - checkExpr.append('skipCall |= validate_struct_pnext(layer_data->report_data, "{}", {ppp}"{}"{pps}, {}, {}{}, {}, {}, GeneratedHeaderVersion);\n'.format( - funcPrintName, valuePrintName, extStructNames, prefix, value.name, extStructCount, extStructVar, **postProcSpec)) + checkExpr.append('skipCall |= validate_struct_pnext(layer_data->report_data, "{}", {ppp}"{}"{pps}, {}, {}{}, {}, {}, GeneratedHeaderVersion, {});\n'.format( + funcPrintName, valuePrintName, extStructNames, prefix, value.name, extStructCount, extStructVar, vuid, **postProcSpec)) return checkExpr # # Generate the pointer check string @@ -991,7 +992,7 @@ class ParamCheckerOutputGenerator(OutputGenerator): elif value.name == 'pNext': # We need to ignore VkDeviceCreateInfo and VkInstanceCreateInfo, as the loader manipulates them in a way that is not documented in vk.xml if not structTypeName in ['VkDeviceCreateInfo', 'VkInstanceCreateInfo']: - usedLines += self.makeStructNextCheck(valuePrefix, value, funcName, valueDisplayName, postProcSpec) + usedLines += self.makeStructNextCheck(valuePrefix, value, funcName, valueDisplayName, postProcSpec, structTypeName) else: usedLines += self.makePointerCheck(valuePrefix, value, lenParam, req, cvReq, cpReq, funcName, lenDisplayName, valueDisplayName, postProcSpec) # |
