summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-10-16 21:46:55 -0700
committerJason Ekstrand <[email protected]>2018-03-07 12:13:47 -0800
commiteb23ca069fa15bb2c0527a741e49ea47c4ab2fae (patch)
treed54033b858a4bceb5154fd0f302a42cbfec1c675 /src/intel
parent05fc377f2e927c65efa67897c6bb35ff65bcd1e8 (diff)
anv/entrypoints: Generate #ifdef guards from platform attributes
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_entrypoints_gen.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index fbbbf896a6c..55ebd169064 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -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