aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-02-27 12:20:56 +0000
committerEric Engestrom <[email protected]>2019-03-05 11:57:10 +0000
commitfe205818c243528924c1beca5dfeef5f81495401 (patch)
tree75db87738bb65a4584271f7d4dc8084ce31a51c2 /src/amd/vulkan
parent3d4238d26c5de4a0f7a5c225c77fd29db29672ee (diff)
radv: use the platform defines in vk.xml instead of hard-coding them
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_entrypoints_gen.py11
1 files 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']