[Mesa-dev] [RESEND 04/13] anv: don't pass xmlfile via stdin anv_entrypoints_gen.py
Emil Velikov
emil.l.velikov at gmail.com
Thu Feb 23 10:24:21 UTC 2017
Hi Dylan,
General question - have you considered porting the series to the radv ?
Alternatively - Bas, Dave you might find these interesting/useful ;-)
On 22 February 2017 at 23:36, Dylan Baker <dylan at pnwbakers.com> wrote:
> It's slow, and has the potential for encoding issues.
>
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
> src/intel/vulkan/Makefile.am | 6 ++----
> src/intel/vulkan/anv_entrypoints_gen.py | 6 +++++-
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
> index 449188fe1e..5a0e4ef4ff 100644
> --- a/src/intel/vulkan/Makefile.am
> +++ b/src/intel/vulkan/Makefile.am
> @@ -146,12 +146,10 @@ libvulkan_intel_la_SOURCES = $(VULKAN_GEM_FILES)
> vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
>
> anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_api_xml)
> - $(AM_V_GEN) cat $(vulkan_api_xml) |\
> - $(PYTHON2) $(srcdir)/anv_entrypoints_gen.py header > $@
> + $(AM_V_GEN)$(PYTHON2) $(srcdir)/anv_entrypoints_gen.py header > $@
>
> anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_api_xml)
> - $(AM_V_GEN) cat $(vulkan_api_xml) |\
> - $(PYTHON2) $(srcdir)/anv_entrypoints_gen.py code > $@
> + $(AM_V_GEN)$(PYTHON2) $(srcdir)/anv_entrypoints_gen.py code > $@
>
Can you please apply similar [trivial] fix for Android.mk ?
> BUILT_SOURCES = $(VULKAN_GENERATED_FILES)
> CLEANFILES = $(BUILT_SOURCES) dev_icd.json intel_icd. at host_cpu@.json
> diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
> index 40b8c805d5..5403bcb4bc 100644
> --- a/src/intel/vulkan/anv_entrypoints_gen.py
> +++ b/src/intel/vulkan/anv_entrypoints_gen.py
> @@ -22,10 +22,14 @@
> # IN THE SOFTWARE.
> #
>
> +import os
> import sys
> import textwrap
> import xml.etree.ElementTree as et
>
> +VK_XML = os.path.join(
> + os.path.dirname(__file__), '..', '..', 'vulkan', 'registry', 'vk.xml')
Hard-coded paths is very, very bad idea. Please feed it in as argument.
Thanks
Emil
More information about the mesa-dev
mailing list