uint32_t num;
};
-/* We use a big string constant to avoid lots of reloctions from the entry
+/* We use a big string constant to avoid lots of relocations from the entry
* point table to lots of little strings. The entries in the entry point table
* store the index into this big string.
*/
/* Hash table stats:
* size ${len(strmap.sorted_strings)} entries
* collisions entries:
-% for i in xrange(10):
+% for i in range(10):
* ${i}${'+' if i == 9 else ' '} ${strmap.collisions[i]}
% endfor
*/
if ext_name not in supported_exts:
continue
- if extension.attrib['supported'] != 'vulkan':
- continue
-
ext = supported_exts[ext_name]
ext.type = extension.attrib['type']
e_clone.name = e.name
entrypoints[e.name] = e_clone
- return [e for e in entrypoints.itervalues() if e.enabled]
+ return [e for e in entrypoints.values() if e.enabled]
def get_entrypoints_defines(doc):
fullname = entrypoint.attrib['name']
entrypoints_to_defines[fullname] = define
+ platform_define = {}
+ for platform in doc.findall('./platforms/platform'):
+ name = platform.attrib['name']
+ define = platform.attrib['protect']
+ platform_define[name] = define
+
for extension in doc.findall('./extensions/extension[@platform]'):
platform = extension.attrib['platform']
- define = 'VK_USE_PLATFORM_' + platform.upper() + '_KHR'
+ define = platform_define[platform]
for entrypoint in extension.findall('./require/command'):
fullname = entrypoint.attrib['name']