X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Famd%2Fvulkan%2Fradv_entrypoints_gen.py;h=946b10910c6e663d79ecbd620288179d8c862e12;hb=4f18c43d1df64135e8968a7d4fbfd2c9918b76ae;hp=892491e6c300381e92f9185664f5188e272edf12;hpb=9267ff9883f749dd1708c573c0df4b46687ff973;p=mesa.git diff --git a/src/amd/vulkan/radv_entrypoints_gen.py b/src/amd/vulkan/radv_entrypoints_gen.py index 892491e6c30..946b10910c6 100644 --- a/src/amd/vulkan/radv_entrypoints_gen.py +++ b/src/amd/vulkan/radv_entrypoints_gen.py @@ -116,7 +116,7 @@ struct string_map_entry { 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. */ @@ -136,7 +136,7 @@ static const struct string_map_entry string_map_entries[] = { /* 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 */ @@ -413,9 +413,6 @@ def get_entrypoints(doc, entrypoints_to_defines, start_index): if ext_name not in supported_exts: continue - if extension.attrib['supported'] != 'vulkan': - continue - ext = supported_exts[ext_name] ext.type = extension.attrib['type'] @@ -433,7 +430,7 @@ def get_entrypoints(doc, entrypoints_to_defines, start_index): 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): @@ -447,9 +444,15 @@ 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']