Quoting Jason Ekstrand (2018-04-09 22:04:02)
> 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.
> 
> Cc: Dylan Baker <dy...@pnwbakers.com>
> Cc: Tapani Pälli <tapani.pa...@intel.com>
> ---
>  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 
> ------------------------
>  11 files changed, 26 insertions(+), 108 deletions(-)
>  delete mode 100644 src/vulkan/registry/vk_android_native_buffer.xml
> 
> diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am
> index 00b8082..18f263a 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 c3a6a81..b5a99fe 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 a25db63..a680f42 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'

Does it make more sense to hardcode this here, or just make the change to the
XML locally since that same change is (presumably) already under review to be
included in the Khronos XML?

I'll trust your judgement either way,
Reviewed-by: Dylan Baker <dy...@pnwbakers.com>

Attachment: signature.asc
Description: signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to