From 69f447553c6cd8c9004b80c099630ce7167a0a28 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 9 Apr 2018 22:01:14 -0700 Subject: 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 --- src/Makefile.am | 1 - src/amd/vulkan/Makefile.am | 3 -- src/amd/vulkan/meson.build | 4 +- src/amd/vulkan/radv_extensions.py | 17 +++----- src/intel/Android.vulkan.mk | 6 +-- src/intel/Makefile.vulkan.am | 13 ++---- src/intel/vulkan/anv_extensions_gen.py | 17 +++----- src/intel/vulkan/meson.build | 12 +++--- src/vulkan/Android.mk | 4 +- src/vulkan/Makefile.am | 5 +-- src/vulkan/meson.build | 1 - src/vulkan/registry/vk_android_native_buffer.xml | 52 ------------------------ 12 files changed, 26 insertions(+), 109 deletions(-) delete mode 100644 src/vulkan/registry/vk_android_native_buffer.xml 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 element in - # vk.xml lists it as supported="disabled" and provides only a stub - # definition. Its 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 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 element in - # vk.xml lists it as supported="disabled" and provides only a stub - # definition. Its 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 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 @@ - - - - - VkStructureType sType - const void* pNext - buffer_handle_t handle - int stride - int format - int usage - - - - - VkResult vkGetSwapchainGrallocUsageANDROID - VkDevice device - VkFormat format - VkImageUsageFlags imageUsage - int* grallocUsage - - - VkResult vkAcquireImageANDROID - VkDevice device - VkImage image - int nativeFenceFd - VkSemaphore semaphore - VkFence fence - - - VkResult vkQueueSignalReleaseImageANDROID - VkQueue queue - uint32_t waitSemaphoreCount - const VkSemaphore* pWaitSemaphores - VkImage image - int* pNativeFenceFd - - - - - - - - - - - - - - - - - -- cgit v1.2.3