MCPcopy Index your code
hub / github.com/KhronosGroup/Vulkan-Docs / mapInterfaceKeys

Method mapInterfaceKeys

scripts/scriptgenerator.py:99–119  ·  view source on GitHub ↗

Construct reverse mapping of APIs to features requiring them in self.apimap. - feature - name of the feature being generated - key - API category - 'define', 'basetype', etc.

(self, feature, key)

Source from the content-addressed store, hash-verified

97 self.apimap[api] = [ deps ]
98
99 def mapInterfaceKeys(self, feature, key):
100 """Construct reverse mapping of APIs to features requiring them in
101 self.apimap.
102
103 - feature - name of the feature being generated
104 - key - API category - 'define', 'basetype', etc."""
105
106 dict = self.featureDictionary[feature][key]
107
108 if dict:
109 # Not clear why handling of command vs. type APIs is different -
110 # see interfacedocgenerator.py, which this was based on.
111 if key == 'command':
112 for required in dict:
113 for api in dict[required]:
114 self.addInterfaceMapping(api, feature, required)
115 else:
116 for required in dict:
117 for parent in dict[required]:
118 for api in dict[required][parent]:
119 self.addInterfaceMapping(api, feature, required)
120
121 def mapInterfaces(self, feature):
122 """Construct reverse mapping of APIs to features requiring them in

Callers 1

mapInterfacesMethod · 0.95

Calls 1

addInterfaceMappingMethod · 0.95

Tested by

no test coverage detected