[Mesa-dev] [PATCH 2/6] nir: Implement a Mesa IR -> NIR translator.
Emil Velikov
emil.l.velikov at gmail.com
Wed Mar 25 07:57:13 PDT 2015
On 24 March 2015 at 22:18, Kenneth Graunke <kenneth at whitecape.org> wrote:
> 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.
>
>From a quick look at the log I was with the impression that things did
not work even with $(top_builddir)/src/glsl/nir. So I was suspecting
some race (lack of dependency tracking). Glad to hear that it's
sorted.
Cheers
Emil
More information about the mesa-dev
mailing list