[Mesa-dev] [PATCH 2/6] nir: Implement a Mesa IR -> NIR translator.
Kenneth Graunke
kenneth at whitecape.org
Tue Mar 24 15:18:51 PDT 2015
On Tuesday, March 24, 2015 08:52:01 PM Emil Velikov wrote:
> Hi Ken,
>
> On 24/03/15 00:37, Kenneth Graunke wrote:
> > Shamelessly ripped off from Eric Anholt's tgsi_to_nir pass.
> >
> > Not compiled on SCons, like the rest of NIR.
> >
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > ---
> > src/mesa/Makefile.am | 2 +
> > src/mesa/Makefile.sources | 5 +
> > src/mesa/program/prog_instruction.h | 2 +
> > src/mesa/program/prog_to_nir.c | 1189
+++++++++++++++++++++++++++++++++++
> > src/mesa/program/prog_to_nir.h | 37 ++
> > 5 files changed, 1235 insertions(+)
> > create mode 100644 src/mesa/program/prog_to_nir.c
> > create mode 100644 src/mesa/program/prog_to_nir.h
> >
> > diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
> > index 3dab8f0..60114e4 100644
> > --- a/src/mesa/Makefile.am
> > +++ b/src/mesa/Makefile.am
> > @@ -174,6 +174,7 @@ endif
> > libmesa_la_SOURCES = \
> > $(MESA_FILES) \
> > $(PROGRAM_FILES) \
> > + $(PROGRAM_NIR_FILES) \
> > $(MESA_ASM_FILES_FOR_ARCH)
> >
> > libmesa_la_LIBADD = \
> > @@ -183,6 +184,7 @@ libmesa_la_LIBADD = \
> > libmesagallium_la_SOURCES = \
> > $(MESA_GALLIUM_FILES) \
> > $(PROGRAM_FILES) \
> > + $(PROGRAM_NIR_FILES) \
> > $(MESA_ASM_FILES_FOR_ARCH)
> >
> > libmesagallium_la_LIBADD = \
> > diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources
> > index 217be9a..cc166ce 100644
> > --- a/src/mesa/Makefile.sources
> > +++ b/src/mesa/Makefile.sources
> > @@ -520,6 +520,10 @@ PROGRAM_FILES = \
> > program/symbol_table.c \
> > program/symbol_table.h
> >
> > +PROGRAM_NIR_FILES = \
> > + program/prog_to_nir.c \
> > + program/prog_to_nir.h
> > +
> > ASM_C_FILES = \
> > x86/common_x86.c \
> > x86/x86_xform.c \
> > @@ -608,6 +612,7 @@ INCLUDE_DIRS = \
> > -I$(top_srcdir)/src \
> > -I$(top_srcdir)/src/glsl \
> > -I$(top_builddir)/src/glsl \
> > + -I$(top_builddir)/src/glsl/nir \
> Hi Ken,
>
> Thanks for handling all the build cruft :)
>
> Noticed that you mentioned some build issues - was it locally or with
> jenkins ? I've just pushed a series has some related patches. If you're
> still seeing those can you open a bug report and/or post the build log
> somewhere.
>
> Cheers,
> Emil
It seems to be working fine now - I figured it out :)
prog_to_nir.c includes nir.h, which contains #include "nir_opcodes.h".
nir_opcodes.h is autogenerated, so it lives in $(top_builddir)/src/glsl/nir.
I normally do in-tree builds, so it worked fine for me, but broke on
Jenkins (which is doing out-of-tree builds). Ilia reminded me how to do
out of tree builds and then the solution was easy - add the -I line
above.
Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150324/51d0829d/attachment.sig>
More information about the mesa-dev
mailing list