On 25 November 2015 at 21:54, Matt Turner <matts...@gmail.com> wrote: > On Wed, Nov 25, 2015 at 1:31 PM, Emil Velikov <emil.l.veli...@gmail.com> > wrote: >> From: Emil Velikov <emil.veli...@collabora.com> >> >> Currently it's an empty library, although it'll be used to store common >> code between GLSL and NIR that is compiler specific (rather than generic >> as the one in src/util). >> >> XXX: strictly speaking we could add a python/mako parser to generate the >> relevant files instead including builtin_type_macros.h in such a manner.
Should have moved this comment after the --- line. Sorry about that. > > I don't think that's valuable. What we have now is a totally > appropriate use of the C preprocessor. > Appropriate - definitely, beautiful (subjective, I know) not as much. Never been a fan of these kind of uses of the preprocessor, although if people like it, I won't nitpick. >> >> Signed-off-by: Emil Velikov <emil.veli...@collabora.com> >> --- >> configure.ac | 1 + >> src/Makefile.am | 3 +++ >> src/compiler/Makefile.am | 25 >> ++++++++++++++++++++++++ >> src/compiler/Makefile.sources | 2 ++ >> src/{glsl/nir => compiler}/builtin_type_macros.h | 0 >> src/glsl/Makefile.sources | 1 - >> src/glsl/builtin_types.cpp | 2 +- >> src/glsl/nir/glsl_types.cpp | 2 +- >> src/glsl/nir/glsl_types.h | 4 ++-- >> 9 files changed, 35 insertions(+), 5 deletions(-) >> create mode 100644 src/compiler/Makefile.am >> create mode 100644 src/compiler/Makefile.sources >> rename src/{glsl/nir => compiler}/builtin_type_macros.h (100%) >> >> diff --git a/configure.ac b/configure.ac >> index 4016871..fcffc19 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -2346,6 +2346,7 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS" >> dnl Substitute the config >> AC_CONFIG_FILES([Makefile >> src/Makefile >> + src/compiler/Makefile >> src/egl/Makefile >> src/egl/main/egl.pc >> src/egl/wayland/wayland-drm/Makefile >> diff --git a/src/Makefile.am b/src/Makefile.am >> index 0d49bcd..6357d10 100644 >> --- a/src/Makefile.am >> +++ b/src/Makefile.am >> @@ -21,6 +21,9 @@ >> >> SUBDIRS = . gtest util mapi/glapi/gen mapi >> >> +# XXX: conditionally include > > Conditionally on what? Seems like we're always going to want some kind > of shader compiler. > Once things settle in we can determine exactly. Atm. building opencl or any other gallium target (apart from dri) combined with non-nir driver does not need to dive into src/compiler. Only two of the 11 gallium drivers use NIR. -Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev