mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
turnip: use the platform defines in vk.xml instead of hard-coding them
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
0d12bcbfa7
commit
4a48dd9fb8
1 changed files with 7 additions and 4 deletions
|
|
@ -444,12 +444,15 @@ def get_entrypoints_defines(doc):
|
||||||
fullname = entrypoint.attrib['name']
|
fullname = entrypoint.attrib['name']
|
||||||
entrypoints_to_defines[fullname] = define
|
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]'):
|
for extension in doc.findall('./extensions/extension[@platform]'):
|
||||||
platform = extension.attrib['platform']
|
platform = extension.attrib['platform']
|
||||||
ext = '_KHR'
|
define = platform_define[platform]
|
||||||
if platform.upper() == 'XLIB_XRANDR':
|
|
||||||
ext = '_EXT'
|
|
||||||
define = 'VK_USE_PLATFORM_' + platform.upper() + ext
|
|
||||||
|
|
||||||
for entrypoint in extension.findall('./require/command'):
|
for entrypoint in extension.findall('./require/command'):
|
||||||
fullname = entrypoint.attrib['name']
|
fullname = entrypoint.attrib['name']
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue