[Mesa-dev] [PATCH] vulkan: Drop vk_android_native_buffer.xml

Jason Ekstrand jason at jlekstrand.net
Wed Apr 11 00:30:31 UTC 2018


On Tue, Apr 10, 2018 at 4:29 PM, Dylan Baker <dylan at pnwbakers.com> wrote:

> 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 <dylan at pnwbakers.com>
> > Cc: Tapani Pälli <tapani.palli at 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'd like to avoid patching the Khronos XML.  Otherwise we risk losing the
patch when someone pulls in a future version and stomps it.


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

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180410/b6aa353b/attachment-0001.html>


More information about the mesa-dev mailing list