[Mesa-dev] [PATCH 01/10] compiler: Move glsl_to_nir to libglsl.la
Emil Velikov
emil.l.velikov at gmail.com
Thu May 26 11:59:18 UTC 2016
Hi Jason,
On 26 May 2016 at 02:52, Jason Ekstrand <jason at jlekstrand.net> wrote:
> Right now libglsl.la depends on libnir.la so putting it in libnir.la
> adds a dependency on libglsl.la that goes the wrong direction.
> ---
> src/compiler/Makefile.am | 2 +
> src/compiler/Makefile.nir.am | 5 -
> src/compiler/Makefile.sources | 4 +-
> src/compiler/glsl/glsl_to_nir.cpp | 2026 +++++++++++++++++++++++++++++
> src/compiler/glsl/glsl_to_nir.h | 42 +
> src/compiler/nir/glsl_to_nir.cpp | 2026 -----------------------------
> src/compiler/nir/glsl_to_nir.h | 42 -
> src/mesa/drivers/dri/i965/brw_nir.c | 2 +-
> src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +-
> 9 files changed, 2074 insertions(+), 2077 deletions(-)
> create mode 100644 src/compiler/glsl/glsl_to_nir.cpp
> create mode 100644 src/compiler/glsl/glsl_to_nir.h
> delete mode 100644 src/compiler/nir/glsl_to_nir.cpp
> delete mode 100644 src/compiler/nir/glsl_to_nir.h
>
> diff --git a/src/compiler/Makefile.am b/src/compiler/Makefile.am
> index dc30f90..710ac5a 100644
> --- a/src/compiler/Makefile.am
> +++ b/src/compiler/Makefile.am
> @@ -31,6 +31,8 @@ AM_CPPFLAGS = \
> -I$(top_builddir)/src/compiler/glsl\
> -I$(top_srcdir)/src/compiler/glsl\
> -I$(top_srcdir)/src/compiler/glsl/glcpp\
> + -I$(top_builddir)/src/compiler/nir\
> + -I$(top_srcdir)/src/compiler/nir\
These should be moved and/or duplicated in Makefile.glsl.am shouldn't
they ? Please add space before \, as Matt suggested.
On the SCons side you'll likely need something like the following. If
it doesn't work out, please cc Jose so that he's aware of things going
crazy.
--- a/src/compiler/SConscript
+++ b/src/compiler/SConscript
@@ -21,5 +21,5 @@ compiler = env.ConvenienceLibrary(
)
Export('compiler')
-SConscript('SConscript.glsl')
SConscript('SConscript.nir')
+SConscript('SConscript.glsl')
diff --git a/src/compiler/SConscript.glsl b/src/compiler/SConscript.glsl
index 43a11d1..8d4f71e 100644
--- a/src/compiler/SConscript.glsl
+++ b/src/compiler/SConscript.glsl
@@ -17,12 +17,14 @@ env.Prepend(CPPPATH = [
'#src/gallium/auxiliary',
'#src/compiler/glsl',
'#src/compiler/glsl/glcpp',
+ '#src/compiler/nir',
])
env.Prepend(LIBS = [mesautil])
# Make glcpp-parse.h and glsl_parser.h reachable from the include path.
env.Prepend(CPPPATH = [Dir('.').abspath, Dir('glsl').abspath])
+env.Prepend(CPPPATH = [Dir('.').abspath, Dir('nir').abspath])
glcpp_env = env.Clone()
glcpp_env.Append(YACCFLAGS = [
Feel free to set the following, either locally or globally.
$ git config diff.renames true
This way git will generate -M patches (moved/renamed file) by default.
Thanks
Emil
More information about the mesa-dev
mailing list