mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-23 07:10:23 +00:00
layers: Update PV codegen for Windows warning
Code gen declarations of allowed_structs in nested scopes could cause warnings in Windows. Modified codegen to append the type name to allowed_structs (eg allowed_structs_VkGraphicsPipelineCreateInfo) to avoid name collisions. Change-Id: I40bd57ff34dcd1df01d3606c79dacbe06b00f464
This commit is contained in:
parent
166e642627
commit
d1a1f82271
@ -793,11 +793,11 @@ class ParamCheckerOutputGenerator(OutputGenerator):
|
||||
extStructNames = 'NULL'
|
||||
vuid = self.GetVuid("VUID-%s-pNext-pNext" % struct_type_name)
|
||||
if value.extstructs:
|
||||
extStructVar = 'allowed_structs_{}'.format(struct_type_name)
|
||||
extStructCount = 'ARRAY_SIZE({})'.format(extStructVar)
|
||||
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('const VkStructureType {}[] = {{ {} }};\n'.format(extStructVar, ', '.join([self.getStructType(s) for s in structs])))
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user