Mesa (master): radv: use the platform defines in vk.xml instead of hard-coding them
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Mar 5 11:57:23 UTC 2019
Module: Mesa
Branch: master
Commit: fe205818c243528924c1beca5dfeef5f81495401
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe205818c243528924c1beca5dfeef5f81495401
Author: Eric Engestrom <eric.engestrom at intel.com>
Date: Wed Feb 27 12:20:56 2019 +0000
radv: use the platform defines in vk.xml instead of hard-coding them
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/amd/vulkan/radv_entrypoints_gen.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/amd/vulkan/radv_entrypoints_gen.py b/src/amd/vulkan/radv_entrypoints_gen.py
index 377b544c2aa..946b10910c6 100644
--- a/src/amd/vulkan/radv_entrypoints_gen.py
+++ b/src/amd/vulkan/radv_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']
More information about the mesa-commit
mailing list