[Mesa-dev] [PATCH] android: vulkan: add support for libmesa_vulkan_{util, wsi}

Emil Velikov emil.l.velikov at gmail.com
Sun Feb 26 18:16:09 UTC 2017


Hi Mauro,

On 25 February 2017 at 18:31, Mauro Rossi <issor.oruam at gmail.com> wrote:
> The following commits require android porting:
>
> e9dcb17 "vulkan/util: Add generator for enum_to_str functions"
> 8e03250 "vulkan: Combine wsi and util makefiles"
>
Please add "Fixes: " before each one of these. See commit
5398d006de3d2bd668e3fc4b80a3de0c101a3e43


> +LOCAL_GENERATED_SOURCES := \
> +       $(intermediates)/util/vk_enum_to_str.c \
> +       $(intermediates)/util/vk_enum_to_str.h
> +
> +vulkan_api_xml = $(MESA_TOP)/src/vulkan/registry/vk.xml
> +
> +$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
> +$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL := $(PRIVATE_PYTHON) $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py -o $(intermediates)/util
> +$(LOCAL_GENERATED_SOURCES): $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py $(vulkan_api_xml)
> +       $(transform-generated-source)
> +
I feel like a broken record:

Can we stop copying these/such generation rules, please ?



> +#
> +# libmesa_vulkan_wsi
> +#
> +
> +include $(CLEAR_VARS)
> +LOCAL_MODULE := libmesa_vulkan_wsi
> +
> +LOCAL_SRC_FILES := $(VULKAN_WSI_SOURCES)
> +
> +LOCAL_C_INCLUDES := \
> +       $(MESA_TOP)/include/vulkan
> +
> +include $(MESA_COMMON_MK)
> +include $(BUILD_STATIC_LIBRARY)
This part [libmesa_vulkan_wsi] is unused so I'll keep it out for now.



>  util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py $(vulkan_api_xml)
>         $(MKDIR_GEN)
> -       $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py
> +       $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py -o $(top_builddir)/src/vulkan/util
>
Nice one, thank you !


> @@ -30,6 +31,14 @@ from mako.template import Template
>
>  VK_XML = os.path.join(os.path.dirname(__file__), '..', 'registry', 'vk.xml')
>
> +parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter)
> +parser.add_argument('-o', '--output-path', help=textwrap.dedent('''\
> +   -o $(top_builddir)/src/vulkan/util for Linux builds
> +   -o $(intermediates)/util for Android builds'''),
Not sure if we need all this help string. Not to mention that we'll
forget to update as we move things around.

That aside things look fine from my POV but I'd appreciate an ack from
Dylan on the Python parts.


Thanks
Emil


More information about the mesa-dev mailing list