diff options
author | Jason Ekstrand <[email protected]> | 2016-05-25 16:00:38 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-05-26 14:13:38 -0700 |
commit | 32210dea8e474f8e93f5df681fb6a8265a0cda4b (patch) | |
tree | c25fdd05d4f55131c161b7197b5ebf09eb5cf503 | |
parent | ddcfc35f62ed3ad83b100beacb5b30394dcd9960 (diff) |
compiler: Move glsl_to_nir to libglsl.la
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.
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
-rw-r--r-- | src/compiler/Android.glsl.mk | 1 | ||||
-rw-r--r-- | src/compiler/Makefile.am | 2 | ||||
-rw-r--r-- | src/compiler/Makefile.nir.am | 5 | ||||
-rw-r--r-- | src/compiler/Makefile.sources | 4 | ||||
-rw-r--r-- | src/compiler/SConscript.glsl | 3 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp (renamed from src/compiler/nir/glsl_to_nir.cpp) | 10 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.h (renamed from src/compiler/nir/glsl_to_nir.h) | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_nir.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 |
10 files changed, 17 insertions, 16 deletions
diff --git a/src/compiler/Android.glsl.mk b/src/compiler/Android.glsl.mk index 8184d2dc898..5d2bc189978 100644 --- a/src/compiler/Android.glsl.mk +++ b/src/compiler/Android.glsl.mk @@ -38,6 +38,7 @@ LOCAL_SRC_FILES := \ $(LIBGLSL_FILES) \ LOCAL_C_INCLUDES := \ + $(MESA_TOP)/src/compiler/nir \ $(MESA_TOP)/src/mapi \ $(MESA_TOP)/src/mesa \ $(MESA_TOP)/src/gallium/include \ diff --git a/src/compiler/Makefile.am b/src/compiler/Makefile.am index dc30f908d8a..50e87bb835a 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 \ -I$(top_srcdir)/src/gallium/include \ -I$(top_srcdir)/src/gallium/auxiliary \ -I$(top_srcdir)/src/gtest/include \ diff --git a/src/compiler/Makefile.nir.am b/src/compiler/Makefile.nir.am index 45a9c809bf8..08713a82bea 100644 --- a/src/compiler/Makefile.nir.am +++ b/src/compiler/Makefile.nir.am @@ -23,11 +23,6 @@ noinst_LTLIBRARIES += nir/libnir.la -nir_libnir_la_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - -I$(top_builddir)/src/compiler/nir \ - -I$(top_srcdir)/src/compiler/nir - nir_libnir_la_LIBADD = \ libcompiler.la diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources index ebc5953eb97..800e3187c0d 100644 --- a/src/compiler/Makefile.sources +++ b/src/compiler/Makefile.sources @@ -25,6 +25,8 @@ LIBGLSL_FILES = \ glsl/glsl_parser_extras.h \ glsl/glsl_symbol_table.cpp \ glsl/glsl_symbol_table.h \ + glsl/glsl_to_nir.cpp \ + glsl/glsl_to_nir.h \ glsl/hir_field_selection.cpp \ glsl/ir_basic_block.cpp \ glsl/ir_basic_block.h \ @@ -164,8 +166,6 @@ NIR_GENERATED_FILES = \ nir/nir_opt_algebraic.c NIR_FILES = \ - nir/glsl_to_nir.cpp \ - nir/glsl_to_nir.h \ nir/nir.c \ nir/nir.h \ nir/nir_array.h \ diff --git a/src/compiler/SConscript.glsl b/src/compiler/SConscript.glsl index 474df11d566..4252ce15771 100644 --- a/src/compiler/SConscript.glsl +++ b/src/compiler/SConscript.glsl @@ -17,12 +17,15 @@ 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]) +# Make NIR headers reachable from the include path. +env.Prepend(CPPPATH = [Dir('.').abspath, Dir('nir').abspath]) glcpp_env = env.Clone() glcpp_env.Append(YACCFLAGS = [ diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 00e3fd5b71e..63a2cfdb8b9 100644 --- a/src/compiler/nir/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -26,11 +26,11 @@ */ #include "glsl_to_nir.h" -#include "nir_control_flow.h" -#include "nir_builder.h" -#include "compiler/glsl/ir_visitor.h" -#include "compiler/glsl/ir_hierarchical_visitor.h" -#include "compiler/glsl/ir.h" +#include "ir_visitor.h" +#include "ir_hierarchical_visitor.h" +#include "ir.h" +#include "compiler/nir/nir_control_flow.h" +#include "compiler/nir/nir_builder.h" #include "main/imports.h" /* diff --git a/src/compiler/nir/glsl_to_nir.h b/src/compiler/glsl/glsl_to_nir.h index 14641fc5176..c63382ea92d 100644 --- a/src/compiler/nir/glsl_to_nir.h +++ b/src/compiler/glsl/glsl_to_nir.h @@ -25,7 +25,7 @@ * */ -#include "nir.h" +#include "compiler/nir/nir.h" #ifdef __cplusplus extern "C" { diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c index 7f5b483e13b..3e97ca5d636 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c @@ -45,7 +45,7 @@ #include "ir3.h" #include "compiler/glsl/standalone.h" -#include "compiler/nir/glsl_to_nir.h" +#include "compiler/glsl/glsl_to_nir.h" static void dump_info(struct ir3_shader_variant *so, const char *str) { diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 66de93018b6..45551a1c460 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -24,7 +24,7 @@ #include "brw_nir.h" #include "brw_shader.h" #include "compiler/glsl_types.h" -#include "compiler/nir/glsl_to_nir.h" +#include "compiler/glsl/glsl_to_nir.h" #include "compiler/nir/nir_builder.h" #include "program/prog_to_nir.h" #include "program/prog_parameter.h" diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 6cfbb8e7683..98c075fcb2c 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -42,8 +42,8 @@ #include "st_glsl_types.h" #include "compiler/nir/nir.h" -#include "compiler/nir/glsl_to_nir.h" #include "compiler/glsl_types.h" +#include "compiler/glsl/glsl_to_nir.h" #include "compiler/glsl/ir.h" |