diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2018-04-09 22:01:14 -0700 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2018-04-10 19:29:49 -0700 |
commit | 69f447553c6cd8c9004b80c099630ce7167a0a28 (patch) | |
tree | 3104813226eb78e98ddd07f2c22e3df1feb3d421 | |
parent | ae3a856c34e348f721c2d647999813801b5eb33c (diff) |
vulkan: Drop vk_android_native_buffer.xml
All the information in vk_android_native_buffer.xml is now in vk.xml.
The only exception is the extension type attribute which we can work
around in the generators while we wait for the XML to be fixed.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/amd/vulkan/Makefile.am | 3 | ||||
-rw-r--r-- | src/amd/vulkan/meson.build | 4 | ||||
-rw-r--r-- | src/amd/vulkan/radv_extensions.py | 17 | ||||
-rw-r--r-- | src/intel/Android.vulkan.mk | 6 | ||||
-rw-r--r-- | src/intel/Makefile.vulkan.am | 13 | ||||
-rw-r--r-- | src/intel/vulkan/anv_extensions_gen.py | 17 | ||||
-rw-r--r-- | src/intel/vulkan/meson.build | 12 | ||||
-rw-r--r-- | src/vulkan/Android.mk | 4 | ||||
-rw-r--r-- | src/vulkan/Makefile.am | 5 | ||||
-rw-r--r-- | src/vulkan/meson.build | 1 | ||||
-rw-r--r-- | src/vulkan/registry/vk_android_native_buffer.xml | 52 |
12 files changed, 26 insertions, 109 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 014ffaf3e2..fd5ae44550 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -67,7 +67,6 @@ SUBDIRS += vulkan endif EXTRA_DIST += vulkan/registry/vk.xml -EXTRA_DIST += vulkan/registry/vk_android_native_buffer.xml if HAVE_AMD_DRIVERS SUBDIRS += amd diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am index 00b808229f..18f263ab44 100644 --- a/src/amd/vulkan/Makefile.am +++ b/src/amd/vulkan/Makefile.am @@ -117,13 +117,11 @@ 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) \ - --xml $(vk_android_native_buffer_xml) \ --outdir $(builddir) radv_entrypoints.h: radv_entrypoints.c @@ -132,7 +130,6 @@ 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-c radv_extensions.c \ --out-h radv_extensions.h radv_extensions.h: radv_extensions.c diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build index c3a6a8182b..b5a99fe91e 100644 --- a/src/amd/vulkan/meson.build +++ b/src/amd/vulkan/meson.build @@ -31,10 +31,10 @@ radv_entrypoints = custom_target( radv_extensions_c = custom_target( 'radv_extensions.c', - input : ['radv_extensions.py', vk_api_xml, vk_android_native_buffer_xml], + input : ['radv_extensions.py', vk_api_xml], output : ['radv_extensions.c', 'radv_extensions.h'], command : [ - prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--xml', '@INPUT2@', '--out-c', '@OUTPUT0@', + prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT0@', '--out-h', '@OUTPUT1@' ], ) diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index a25db637e2..a680f42dec 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -159,18 +159,13 @@ def _init_exts_from_xml(xml): if ext_name not in ext_name_map: continue - # 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'] + if ext_name == 'VK_ANDROID_native_buffer': + # VK_ANDROID_native_buffer is missing the type specifier. Just + # hard-code it to be a device extension for now. + ext.type = 'device' + else: + ext.type = ext_elem.attrib['type'] _TEMPLATE_H = Template(COPYRIGHT + """ #ifndef RADV_EXTENSIONS_H diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk index 0ec0d78a2f..09dc22875a 100644 --- a/src/intel/Android.vulkan.mk +++ b/src/intel/Android.vulkan.mk @@ -67,8 +67,7 @@ $(intermediates)/vulkan/dummy.c: $(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c $(VK_ENTRYPOINTS_SCRIPT) \ --outdir $(dir $@) \ - --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ - --xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml + --xml $(MESA_TOP)/src/vulkan/registry/vk.xml LOCAL_EXPORT_C_INCLUDE_DIRS := \ $(intermediates) @@ -245,21 +244,18 @@ $(intermediates)/vulkan/anv_entrypoints.c: @mkdir -p $(dir $@) $(VK_ENTRYPOINTS_SCRIPT) \ --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ - --xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml \ --outdir $(dir $@) $(intermediates)/vulkan/anv_extensions.c: @mkdir -p $(dir $@) $(VK_EXTENSIONS_SCRIPT) \ --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ - --xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml \ --out-c $@ $(intermediates)/vulkan/anv_extensions.h: @mkdir -p $(dir $@) $(VK_EXTENSIONS_SCRIPT) \ --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \ - --xml $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml \ --out-h $@ LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES) diff --git a/src/intel/Makefile.vulkan.am b/src/intel/Makefile.vulkan.am index 3d5e8e5cfd..0bcbf0419c 100644 --- a/src/intel/Makefile.vulkan.am +++ b/src/intel/Makefile.vulkan.am @@ -23,37 +23,30 @@ # rules must be outside of any AM_CONDITIONALs. Otherwise they will be commented # out and we'll fail at `make dist' 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 vulkan/anv_entrypoints.c: vulkan/anv_entrypoints_gen.py \ vulkan/anv_extensions.py \ - $(vulkan_api_xml) \ - $(vk_android_native_buffer_xml) + $(vulkan_api_xml) $(MKDIR_GEN) $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_entrypoints_gen.py \ --xml $(vulkan_api_xml) \ - --xml $(vk_android_native_buffer_xml) \ --outdir $(builddir)/vulkan vulkan/anv_entrypoints.h: vulkan/anv_entrypoints.c vulkan/anv_extensions.c: vulkan/anv_extensions_gen.py \ vulkan/anv_extensions.py \ - $(vulkan_api_xml) \ - $(vk_android_native_buffer_xml) + $(vulkan_api_xml) $(MKDIR_GEN) $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_extensions_gen.py \ --xml $(vulkan_api_xml) \ - --xml $(vk_android_native_buffer_xml) \ --out-c $@ vulkan/anv_extensions.h: vulkan/anv_extensions_gen.py \ vulkan/anv_extensions.py \ - $(vulkan_api_xml) \ - $(vk_android_native_buffer_xml) + $(vulkan_api_xml) $(MKDIR_GEN) $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_extensions_gen.py \ --xml $(vulkan_api_xml) \ - --xml $(vk_android_native_buffer_xml) \ --out-h $@ BUILT_SOURCES += $(VULKAN_GENERATED_FILES) diff --git a/src/intel/vulkan/anv_extensions_gen.py b/src/intel/vulkan/anv_extensions_gen.py index 9bcb631b12..57a528563e 100644 --- a/src/intel/vulkan/anv_extensions_gen.py +++ b/src/intel/vulkan/anv_extensions_gen.py @@ -45,18 +45,13 @@ def _init_exts_from_xml(xml): if ext_name not in ext_name_map: continue - # 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'] + if ext_name == 'VK_ANDROID_native_buffer': + # VK_ANDROID_native_buffer is missing the type specifier. Just + # hard-code it to be a device extension for now. + ext.type = 'device' + else: + ext.type = ext_elem.attrib['type'] _TEMPLATE_H = Template(COPYRIGHT + """ diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build index ef50134636..2dce0a1515 100644 --- a/src/intel/vulkan/meson.build +++ b/src/intel/vulkan/meson.build @@ -22,10 +22,10 @@ anv_extensions_py = files('anv_extensions.py') anv_entrypoints = custom_target( 'anv_entrypoints.[ch]', - input : ['anv_entrypoints_gen.py', vk_api_xml, vk_android_native_buffer_xml], + input : ['anv_entrypoints_gen.py', vk_api_xml], output : ['anv_entrypoints.h', 'anv_entrypoints.c'], command : [ - prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--xml', '@INPUT2@', + prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--outdir', meson.current_build_dir(), ], depend_files : anv_extensions_py, @@ -33,10 +33,10 @@ anv_entrypoints = custom_target( anv_extensions_c = custom_target( 'anv_extensions.c', - input : ['anv_extensions_gen.py', vk_api_xml, vk_android_native_buffer_xml], + input : ['anv_extensions_gen.py', vk_api_xml], output : 'anv_extensions.c', command : [ - prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--xml', '@INPUT2@', + prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--out-c', '@OUTPUT@', ], depend_files : anv_extensions_py, @@ -44,10 +44,10 @@ anv_extensions_c = custom_target( anv_extensions_h = custom_target( 'anv_extensions.h', - input : ['anv_extensions_gen.py', vk_api_xml, vk_android_native_buffer_xml], + input : ['anv_extensions_gen.py', vk_api_xml], output : 'anv_extensions.h', command : [ - prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--xml', '@INPUT2@', + prog_python2, '@INPUT0@', '--xml', '@INPUT1@', '--out-h', '@OUTPUT@', ], depend_files : anv_extensions_py, diff --git a/src/vulkan/Android.mk b/src/vulkan/Android.mk index 70b23eae08..6253f1c3be 100644 --- a/src/vulkan/Android.mk +++ b/src/vulkan/Android.mk @@ -45,15 +45,13 @@ LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, \ LOCAL_SRC_FILES := $(VULKAN_UTIL_FILES) $(VULKAN_WSI_FILES) vulkan_api_xml = $(MESA_TOP)/src/vulkan/registry/vk.xml -vk_android_native_buffer_xml = $(MESA_TOP)/src/vulkan/registry/vk_android_native_buffer.xml $(LOCAL_GENERATED_SOURCES): $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py \ - $(vulkan_api_xml) $(vk_android_native_buffer_xml) + $(vulkan_api_xml) @echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))" @mkdir -p $(dir $@) $(hide) $(MESA_PYTHON2) $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py \ --xml $(vulkan_api_xml) \ - --xml $(vk_android_native_buffer_xml) \ --outdir $(dir $@) LOCAL_EXPORT_C_INCLUDE_DIRS := \ diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am index bbcf7d0cc6..3da03ed09e 100644 --- a/src/vulkan/Makefile.am +++ b/src/vulkan/Makefile.am @@ -4,13 +4,11 @@ noinst_LTLIBRARIES = libvulkan_wsi.la libvulkan_util.la vulkan_includedir = $(includedir)/vulkan 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 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D) PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) EXTRA_DIST = \ - $(top_srcdir)/include/vulkan/vk_android_native_buffer.h \ util/gen_enum_to_str.py \ util/meson.build \ wsi/meson.build \ @@ -21,11 +19,10 @@ VULKAN_UTIL_SOURCES = \ $(VULKAN_UTIL_GENERATED_FILES) util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py \ - $(vulkan_api_xml) $(vk_android_native_buffer_xml) + $(vulkan_api_xml) $(MKDIR_GEN) $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py \ --xml $(vulkan_api_xml) \ - --xml $(vk_android_native_buffer_xml) \ --outdir $(top_builddir)/src/vulkan/util libvulkan_util_la_SOURCES = $(VULKAN_UTIL_SOURCES) diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build index 3908005b8a..59e1fd1fab 100644 --- a/src/vulkan/meson.build +++ b/src/vulkan/meson.build @@ -19,7 +19,6 @@ # SOFTWARE. vk_api_xml = files('registry/vk.xml') -vk_android_native_buffer_xml = files('registry/vk_android_native_buffer.xml') inc_vulkan_util = include_directories('util') inc_vulkan_wsi = include_directories('wsi') diff --git a/src/vulkan/registry/vk_android_native_buffer.xml b/src/vulkan/registry/vk_android_native_buffer.xml deleted file mode 100644 index 2738908aa7..0000000000 --- a/src/vulkan/registry/vk_android_native_buffer.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<registry> - <types> - <type category="struct" name="VkNativeBufferANDROID"> - <member values="VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID"><type>VkStructureType</type> <name>sType</name></member> - <member>const <type>void</type>* <name>pNext</name></member> - <member><type>buffer_handle_t</type> <name>handle</name></member> - <member><type>int</type> <name>stride</name></member> - <member><type>int</type> <name>format</name></member> - <member><type>int</type> <name>usage</name></member> - </type> - </types> - <commands> - <command> - <proto><type>VkResult</type> <name>vkGetSwapchainGrallocUsageANDROID</name></proto> - <param><type>VkDevice</type> <name>device</name></param> - <param><type>VkFormat</type> <name>format</name></param> - <param><type>VkImageUsageFlags</type> <name>imageUsage</name></param> - <param><type>int</type>* <name>grallocUsage</name></param> - </command> - <command> - <proto><type>VkResult</type> <name>vkAcquireImageANDROID</name></proto> - <param><type>VkDevice</type> <name>device</name></param> - <param><type>VkImage</type> <name>image</name></param> - <param><type>int</type> <name>nativeFenceFd</name></param> - <param><type>VkSemaphore</type> <name>semaphore</name></param> - <param><type>VkFence</type> <name>fence</name></param> - </command> - <command> - <proto><type>VkResult</type> <name>vkQueueSignalReleaseImageANDROID</name></proto> - <param><type>VkQueue</type> <name>queue</name></param> - <param><type>uint32_t</type> <name>waitSemaphoreCount</name></param> - <param>const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></param> - <param><type>VkImage</type> <name>image</name></param> - <param><type>int</type>* <name>pNativeFenceFd</name></param> - </command> - </commands> - <extensions> - <extension name="VK_ANDROID_native_buffer" number="11" type="device" protect="ANDROID" supported="vulkan"> - <require> - <enum value="5" name="VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION"/> - <enum value="11" name="VK_ANDROID_NATIVE_BUFFER_NUMBER"/> - <enum value=""VK_ANDROID_native_buffer"" name="VK_ANDROID_NATIVE_BUFFER_NAME"/> - <enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID"/> - <type name="VkNativeBufferANDROID"/> - <command name="vkGetSwapchainGrallocUsageANDROID"/> - <command name="vkAcquireImageANDROID"/> - <command name="vkQueueSignalReleaseImageANDROID"/> - </require> - </extension> - </extensions> -</registry> |