diff options
author | Eric Engestrom <[email protected]> | 2019-02-27 12:31:06 +0000 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2019-03-11 10:02:13 -0700 |
commit | 4a48dd9fb8ffef3f90dbf4538f8a17d4e239f997 (patch) | |
tree | b0688961f98acab38b7f18d9269af9ff4e6a0b56 /src | |
parent | 0d12bcbfa7a97823ec55f885613b79a070dee95f (diff) |
turnip: use the platform defines in vk.xml instead of hard-coding them
Signed-off-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/freedreno/vulkan/tu_entrypoints_gen.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/freedreno/vulkan/tu_entrypoints_gen.py b/src/freedreno/vulkan/tu_entrypoints_gen.py index b56b32d9d3b..463eacbb667 100644 --- a/src/freedreno/vulkan/tu_entrypoints_gen.py +++ b/src/freedreno/vulkan/tu_entrypoints_gen.py @@ -444,12 +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'] - ext = '_KHR' - if platform.upper() == 'XLIB_XRANDR': - ext = '_EXT' - define = 'VK_USE_PLATFORM_' + platform.upper() + ext + define = platform_define[platform] for entrypoint in extension.findall('./require/command'): fullname = entrypoint.attrib['name'] |