MCPcopy
hub / github.com/KhronosGroup/Vulkan-Docs / dumpReg

Method dumpReg

scripts/reg.py:1041–1083  ·  view source on GitHub ↗

Dump all the dictionaries constructed from the Registry object. Diagnostic to dump the dictionaries to specified file handle (default stdout). Truncates type / enum / command elements to maxlen characters (default 120)

(self, maxlen=120, filehandle=sys.stdout)

Source from the content-addressed store, hash-verified

1039 self.addElementInfo(pipeline, syncInfo, 'syncpipeline', self.syncpipelinedict)
1040
1041 def dumpReg(self, maxlen=120, filehandle=sys.stdout):
1042 """Dump all the dictionaries constructed from the Registry object.
1043
1044 Diagnostic to dump the dictionaries to specified file handle (default stdout).
1045 Truncates type / enum / command elements to maxlen characters (default 120)"""
1046 write('***************************************', file=filehandle)
1047 write(' ** Dumping Registry contents **', file=filehandle)
1048 write('***************************************', file=filehandle)
1049 write('// Types', file=filehandle)
1050 for name in self.typedict:
1051 tobj = self.typedict[name]
1052 write(' Type', name, '->', etree.tostring(tobj.elem)[0:maxlen], file=filehandle)
1053 write('// Groups', file=filehandle)
1054 for name in self.groupdict:
1055 gobj = self.groupdict[name]
1056 write(' Group', name, '->', etree.tostring(gobj.elem)[0:maxlen], file=filehandle)
1057 write('// Enums', file=filehandle)
1058 for name in self.enumdict:
1059 eobj = self.enumdict[name]
1060 write(' Enum', name, '->', etree.tostring(eobj.elem)[0:maxlen], file=filehandle)
1061 write('// Commands', file=filehandle)
1062 for name in self.cmddict:
1063 cobj = self.cmddict[name]
1064 write(' Command', name, '->', etree.tostring(cobj.elem)[0:maxlen], file=filehandle)
1065 write('// APIs', file=filehandle)
1066 for key in self.apidict:
1067 write(' API Version ', key, '->',
1068 etree.tostring(self.apidict[key].elem)[0:maxlen], file=filehandle)
1069 write('// Extensions', file=filehandle)
1070 for key in self.extdict:
1071 write(' Extension', key, '->',
1072 etree.tostring(self.extdict[key].elem)[0:maxlen], file=filehandle)
1073 write('// SPIR-V', file=filehandle)
1074 for key in self.spirvextdict:
1075 write(' SPIR-V Extension', key, '->',
1076 etree.tostring(self.spirvextdict[key].elem)[0:maxlen], file=filehandle)
1077 for key in self.spirvcapdict:
1078 write(' SPIR-V Capability', key, '->',
1079 etree.tostring(self.spirvcapdict[key].elem)[0:maxlen], file=filehandle)
1080 write('// VkFormat', file=filehandle)
1081 for key in self.formatsdict:
1082 write(' VkFormat', key, '->',
1083 etree.tostring(self.formatsdict[key].elem)[0:maxlen], file=filehandle)
1084
1085 def markTypeRequired(self, typename, required):
1086 """Require (along with its dependencies) or remove (but not its dependencies) a type.

Callers 1

genvk.pyFile · 0.80

Calls 1

writeFunction · 0.90

Tested by

no test coverage detected