[Mesa-dev] [RESEND 08/13] anv: generate anv_entrypoints.{h, c} in one command

Dylan Baker dylan at pnwbakers.com
Thu Feb 23 17:49:31 UTC 2017


Quoting Emil Velikov (2017-02-23 09:29:40)
> On 23 February 2017 at 17:22, Dylan Baker <dylan at pnwbakers.com> wrote:
> > Quoting Emil Velikov (2017-02-23 02:32:17)
> >> On 22 February 2017 at 23:35, Dylan Baker <dylan at pnwbakers.com> wrote:
> >> > This changes the python generator to write the files itself, rather than
> >> > piping them out. This has a couple of advantages: first, it encapsulates
> >> > the encoding. Second, it ensures that the header file and code file are
> >> > generated at the same time with the same data.
> >> >
> >> Last time there were some serious objections to doing this. Glad that
> >> you got those covered ;-)
> >>
> >> > Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> >> > ---
> >> >  src/intel/vulkan/Makefile.am            |  7 ++----
> >> >  src/intel/vulkan/anv_entrypoints_gen.py | 38 ++++++++++++---------------------
> >> >  2 files changed, 16 insertions(+), 29 deletions(-)
> >> >
> >> > diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
> >> > index 5a0e4ef4ff..68bc5ccf86 100644
> >> > --- a/src/intel/vulkan/Makefile.am
> >> > +++ b/src/intel/vulkan/Makefile.am
> >> > @@ -145,11 +145,8 @@ 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)$(PYTHON2) $(srcdir)/anv_entrypoints_gen.py header > $@
> >> > -
> >> > -anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_api_xml)
> >> > -       $(AM_V_GEN)$(PYTHON2) $(srcdir)/anv_entrypoints_gen.py code > $@
> >> > +anv_entrypoints.h anv_entrypoints.c: anv_entrypoints_gen.py $(vulkan_api_xml)
> >> > +       $(AM_V_GEN)$(PYTHON2) $(srcdir)/anv_entrypoints_gen.py
> >> >
> >> Please pass a "-o $dst_dir" type of argument. It will be/is broken otherwise.
> >
> > So you want an option for where the output files are going to be placed?
> >
> Precisely. To elaborate a bit - as-is (if I'm reading it properly)
> you'll end up generating the files to srcdir.
> srcdir should be considered immutable and this will fail a bunch of tests.
> 
> Generated files should be stored in $builddir.

On my system as-is they end up in $builddir, however, we discovered yesterday
that some out-of-tree builds work on my system, but fail on everybody else's, so
I'll go ahead and add that switch.

> 
> Thanks
> Emil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170223/b6bb3a34/attachment.sig>


More information about the mesa-dev mailing list