Commit eb23ca06 authored by Jason Ekstrand's avatar Jason Ekstrand

anv/entrypoints: Generate #ifdef guards from platform attributes

Reviewed-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsálvez <siglesias@igalia.com>
parent 05fc377f
......@@ -512,6 +512,14 @@ def get_entrypoints_defines(doc):
fullname = entrypoint.attrib['name']
entrypoints_to_defines[fullname] = define
for extension in doc.findall('./extensions/extension[@platform]'):
platform = extension.attrib['platform']
define = 'VK_USE_PLATFORM_' + platform.upper() + '_KHR'
for entrypoint in extension.findall('./require/command'):
fullname = entrypoint.attrib['name']
entrypoints_to_defines[fullname] = define
return entrypoints_to_defines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment