summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_extensions.py
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-08-22 16:26:03 -0700
committerChad Versace <[email protected]>2017-09-18 14:26:54 -0700
commit39c9d435364a30a97b64c2b6388081cdcefbf683 (patch)
treef4fbd7f4364421df0b31d3d909ee864f4c1b39e7 /src/intel/vulkan/anv_extensions.py
parent6a5ff18039d0c35e79ac24ceae2479d5c7c85bd3 (diff)
anv: Feed vk_android_native_buffer.xml to generators (v2)
Feed the XML to anv_extensions.py and anv_entrypoints_gen.py. Do it on all platforms, not just Android. Tested on Android and Fedora. We always parse the Android XML, regardless of target platform, to help reduce the chance that people working on non-Android break the Android build. v2: - Squash in Tapani's changes to Android.*.mk. Reviewed-by: Tapani Pälli <[email protected]> (v1)
Diffstat (limited to 'src/intel/vulkan/anv_extensions.py')
-rw-r--r--src/intel/vulkan/anv_extensions.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
index 4dfde064ca7..0284d102592 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -136,8 +136,18 @@ def _init_exts_from_xml(xml):
ext_name = ext_elem.attrib['name']
if ext_name not in ext_name_map:
continue
- ext = ext_name_map[ext_name]
+ # Workaround for VK_ANDROID_native_buffer. Its <extension> element in
+ # vk.xml lists it as supported="disabled" and provides only a stub
+ # definition. Its <extension> element in Mesa's custom
+ # vk_android_native_buffer.xml, though, lists it as
+ # supported='android-vendor' and fully defines the extension. We want
+ # to skip the <extension> element in vk.xml.
+ if ext_elem.attrib['supported'] == 'disabled':
+ assert ext_name == 'VK_ANDROID_native_buffer'
+ continue
+
+ ext = ext_name_map[ext_name]
ext.type = ext_elem.attrib['type']
_TEMPLATE = Template(COPYRIGHT + """