radv: Generate VK_ANDROID_native_buffer.
authorBas Nieuwenhuizen <basni@chromium.org>
Thu, 4 Jan 2018 17:38:30 +0000 (18:38 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 19 Jan 2018 00:43:55 +0000 (01:43 +0100)
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/Makefile.am
src/amd/vulkan/radv_entrypoints_gen.py
src/amd/vulkan/radv_extensions.py

index 6b352aebf989bb74abc411e8bbd0a9dba0c013c4..e1a04e8c7f15308a5f746fcfdaab0a429609e7bf 100644 (file)
@@ -106,11 +106,14 @@ nodist_EXTRA_libvulkan_radeon_la_SOURCES = dummy.cpp
 libvulkan_radeon_la_SOURCES = $(VULKAN_GEM_FILES)
 
 vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
+vk_android_native_buffer_xml = $(top_srcdir)/src/vulkan/registry/vk_android_native_buffer.xml
 
 radv_entrypoints.c: radv_entrypoints_gen.py radv_extensions.py $(vulkan_api_xml)
        $(MKDIR_GEN)
        $(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_entrypoints_gen.py \
-               --xml $(vulkan_api_xml) --outdir $(builddir)
+               --xml $(vulkan_api_xml) \
+               --xml $(vk_android_native_buffer_xml) \
+               --outdir $(builddir)
 radv_entrypoints.h: radv_entrypoints.c
 
 radv_extensions.c: radv_extensions.py \
@@ -118,6 +121,7 @@ radv_extensions.c: radv_extensions.py \
        $(MKDIR_GEN)
        $(AM_V_GEN)$(PYTHON2) $(srcdir)/radv_extensions.py \
                --xml $(vulkan_api_xml) \
+               --xml $(vk_android_native_buffer_xml) \
                --out $@
 
 vk_format_table.c: vk_format_table.py \
index f8f99d00b79e25c95395ab846ae4d3f3692a3186..c981c0be13a10bcc4931b07f42185fdb1f6f59c4 100644 (file)
@@ -237,7 +237,9 @@ def get_entrypoints(doc, entrypoints_to_defines, start_index):
         if extension.attrib['name'] not in supported:
             continue
 
-        assert extension.attrib['supported'] == 'vulkan'
+        if extension.attrib['supported'] != 'vulkan':
+            continue
+
         for command in extension.findall('./require/command'):
             enabled_commands.add(command.attrib['name'])
 
index f11540a5c9673168546a1a2b6eeee166b1ee3a51..ab34c01cb611eb668e233682c26ded834cde68b1 100644 (file)
@@ -50,6 +50,7 @@ class Extension:
 # the those extension strings, then tests dEQP-VK.api.info.instance.extensions
 # and dEQP-VK.api.info.device fail due to the duplicated strings.
 EXTENSIONS = [
+    Extension('VK_ANDROID_native_buffer',                 5, 'ANDROID && device->rad_info.has_syncobj_wait_for_submit'),
     Extension('VK_KHR_bind_memory2',                      1, True),
     Extension('VK_KHR_dedicated_allocation',              1, True),
     Extension('VK_KHR_descriptor_update_template',        1, True),