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>
endif
EXTRA_DIST += vulkan/registry/vk.xml
-EXTRA_DIST += vulkan/registry/vk_android_native_buffer.xml
if HAVE_AMD_DRIVERS
SUBDIRS += amd
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
$(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
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@'
],
)
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
$(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)
@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)
# 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)
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 + """
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,
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,
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,
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 := \
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 \
$(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)
# 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')
+++ /dev/null
-<?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>