[Mesa-dev] [PATCH 6/9] nir: move glsl_types.{cpp,h} to compiler

Emil Velikov emil.l.velikov at gmail.com
Wed Nov 25 13:32:00 PST 2015


From: Emil Velikov <emil.velikov at collabora.com>

Allows us to remove the SCons workaround :-)

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/compiler/Makefile.sources                               | 2 ++
 src/{glsl/nir => compiler}/glsl_types.cpp                   | 2 +-
 src/{glsl/nir => compiler}/glsl_types.h                     | 0
 src/gallium/targets/dri/SConscript                          | 1 +
 src/gallium/targets/haiku-softpipe/SConscript               | 1 +
 src/gallium/targets/libgl-gdi/SConscript                    | 2 +-
 src/gallium/targets/libgl-xlib/SConscript                   | 1 +
 src/gallium/targets/osmesa/SConscript                       | 1 +
 src/glsl/Makefile.sources                                   | 2 --
 src/glsl/SConscript                                         | 9 +--------
 src/glsl/ast_array_index.cpp                                | 2 +-
 src/glsl/ast_function.cpp                                   | 2 +-
 src/glsl/ast_to_hir.cpp                                     | 2 +-
 src/glsl/builtin_types.cpp                                  | 2 +-
 src/glsl/glsl_parser.yy                                     | 2 +-
 src/glsl/hir_field_selection.cpp                            | 2 +-
 src/glsl/ir.cpp                                             | 2 +-
 src/glsl/ir.h                                               | 2 +-
 src/glsl/ir_clone.cpp                                       | 2 +-
 src/glsl/ir_constant_expression.cpp                         | 2 +-
 src/glsl/ir_function.cpp                                    | 2 +-
 src/glsl/ir_print_visitor.cpp                               | 2 +-
 src/glsl/ir_reader.cpp                                      | 2 +-
 src/glsl/ir_rvalue_visitor.cpp                              | 2 +-
 src/glsl/ir_set_program_inouts.cpp                          | 2 +-
 src/glsl/ir_validate.cpp                                    | 2 +-
 src/glsl/ir_variable_refcount.cpp                           | 2 +-
 src/glsl/ir_variable_refcount.h                             | 2 +-
 src/glsl/loop_analysis.cpp                                  | 2 +-
 src/glsl/loop_controls.cpp                                  | 2 +-
 src/glsl/loop_unroll.cpp                                    | 2 +-
 src/glsl/lower_const_arrays_to_uniforms.cpp                 | 2 +-
 src/glsl/lower_discard.cpp                                  | 2 +-
 src/glsl/lower_discard_flow.cpp                             | 2 +-
 src/glsl/lower_if_to_cond_assign.cpp                        | 2 +-
 src/glsl/lower_instructions.cpp                             | 2 +-
 src/glsl/lower_jumps.cpp                                    | 2 +-
 src/glsl/lower_mat_op_to_vec.cpp                            | 2 +-
 src/glsl/lower_offset_array.cpp                             | 2 +-
 src/glsl/lower_subroutine.cpp                               | 2 +-
 src/glsl/lower_variable_index_to_cond_assign.cpp            | 2 +-
 src/glsl/lower_vec_index_to_cond_assign.cpp                 | 2 +-
 src/glsl/lower_vec_index_to_swizzle.cpp                     | 2 +-
 src/glsl/nir/nir_types.h                                    | 4 ++--
 src/glsl/opt_algebraic.cpp                                  | 2 +-
 src/glsl/opt_array_splitting.cpp                            | 2 +-
 src/glsl/opt_conditional_discard.cpp                        | 2 +-
 src/glsl/opt_constant_folding.cpp                           | 2 +-
 src/glsl/opt_constant_propagation.cpp                       | 2 +-
 src/glsl/opt_constant_variable.cpp                          | 2 +-
 src/glsl/opt_copy_propagation.cpp                           | 2 +-
 src/glsl/opt_copy_propagation_elements.cpp                  | 2 +-
 src/glsl/opt_dead_builtin_varyings.cpp                      | 2 +-
 src/glsl/opt_dead_code.cpp                                  | 2 +-
 src/glsl/opt_dead_code_local.cpp                            | 2 +-
 src/glsl/opt_dead_functions.cpp                             | 2 +-
 src/glsl/opt_function_inlining.cpp                          | 2 +-
 src/glsl/opt_minmax.cpp                                     | 2 +-
 src/glsl/opt_noop_swizzle.cpp                               | 2 +-
 src/glsl/opt_structure_splitting.cpp                        | 2 +-
 src/glsl/opt_swizzle_swizzle.cpp                            | 2 +-
 src/glsl/opt_tree_grafting.cpp                              | 2 +-
 src/glsl/opt_vectorize.cpp                                  | 2 +-
 src/mesa/SConscript                                         | 1 -
 src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp         | 2 +-
 src/mesa/drivers/dri/i965/brw_fs.cpp                        | 2 +-
 src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp    | 2 +-
 src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp       | 2 +-
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp                | 2 +-
 src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp | 2 +-
 src/mesa/drivers/x11/SConscript                             | 1 +
 src/mesa/main/ff_fragment_shader.cpp                        | 2 +-
 src/mesa/main/uniforms.c                                    | 2 +-
 src/mesa/main/uniforms.h                                    | 2 +-
 src/mesa/program/ir_to_mesa.cpp                             | 2 +-
 src/mesa/program/sampler.cpp                                | 2 +-
 76 files changed, 75 insertions(+), 78 deletions(-)
 rename src/{glsl/nir => compiler}/glsl_types.cpp (99%)
 rename src/{glsl/nir => compiler}/glsl_types.h (100%)

diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources
index 73e1771..38e75cf 100644
--- a/src/compiler/Makefile.sources
+++ b/src/compiler/Makefile.sources
@@ -1,4 +1,6 @@
 LIBCOMPILER_FILES = \
 	builtin_type_macros.h \
+	glsl_types.cpp \
+	glsl_types.h \
 	shader_enums.c \
 	shader_enums.h
diff --git a/src/glsl/nir/glsl_types.cpp b/src/compiler/glsl_types.cpp
similarity index 99%
rename from src/glsl/nir/glsl_types.cpp
rename to src/compiler/glsl_types.cpp
index bb2f24a..6151c8f 100644
--- a/src/glsl/nir/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -23,7 +23,7 @@
 
 #include <stdio.h>
 #include "main/macros.h"
-#include "glsl_parser_extras.h"
+#include "glsl/glsl_parser_extras.h"
 #include "glsl_types.h"
 #include "util/hash_table.h"
 
diff --git a/src/glsl/nir/glsl_types.h b/src/compiler/glsl_types.h
similarity index 100%
rename from src/glsl/nir/glsl_types.h
rename to src/compiler/glsl_types.h
diff --git a/src/gallium/targets/dri/SConscript b/src/gallium/targets/dri/SConscript
index b451659..332f4db 100644
--- a/src/gallium/targets/dri/SConscript
+++ b/src/gallium/targets/dri/SConscript
@@ -43,6 +43,7 @@ env.Prepend(LIBS = [
     mesautil,
     mesa,
     glsl,
+    compiler,
     gallium,
     megadrivers_stub,
     dri_common,
diff --git a/src/gallium/targets/haiku-softpipe/SConscript b/src/gallium/targets/haiku-softpipe/SConscript
index 210721c..a71ff31 100644
--- a/src/gallium/targets/haiku-softpipe/SConscript
+++ b/src/gallium/targets/haiku-softpipe/SConscript
@@ -8,6 +8,7 @@ env.Prepend(LIBS = [
     mesautil,
     mesa,
     glsl,
+    compiler,
     gallium
 ])
 
diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript
index 594f34d..d38c1b8 100644
--- a/src/gallium/targets/libgl-gdi/SConscript
+++ b/src/gallium/targets/libgl-gdi/SConscript
@@ -50,7 +50,7 @@ if env['gles']:
 opengl32 = env.SharedLibrary(
     target ='opengl32',
     source = sources,
-    LIBS = wgl + ws_gdi + glapi + mesa + drivers + gallium + glsl + env['LIBS'],
+    LIBS = wgl + ws_gdi + glapi + mesa + drivers + gallium + glsl + compiler + env['LIBS'],
 )
 
 env.Alias('opengl32', opengl32)
diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
index df5a220..3e941fb 100644
--- a/src/gallium/targets/libgl-xlib/SConscript
+++ b/src/gallium/targets/libgl-xlib/SConscript
@@ -31,6 +31,7 @@ env.Prepend(LIBS = [
     mesautil,
     mesa,
     glsl,
+    compiler,
     gallium,
 ])
 
diff --git a/src/gallium/targets/osmesa/SConscript b/src/gallium/targets/osmesa/SConscript
index 4a9115b..d6839ce 100644
--- a/src/gallium/targets/osmesa/SConscript
+++ b/src/gallium/targets/osmesa/SConscript
@@ -16,6 +16,7 @@ env.Prepend(LIBS = [
     gallium,
     trace,
     glsl,
+    compiler,
     mesautil,
     softpipe
 ])
diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
index 73df60e..80cbd76 100644
--- a/src/glsl/Makefile.sources
+++ b/src/glsl/Makefile.sources
@@ -20,8 +20,6 @@ NIR_GENERATED_FILES = \
 NIR_FILES = \
 	nir/glsl_to_nir.cpp \
 	nir/glsl_to_nir.h \
-	nir/glsl_types.cpp \
-	nir/glsl_types.h \
 	nir/nir.c \
 	nir/nir.h \
 	nir/nir_array.h \
diff --git a/src/glsl/SConscript b/src/glsl/SConscript
index 70bf5b0..de329ad 100644
--- a/src/glsl/SConscript
+++ b/src/glsl/SConscript
@@ -16,7 +16,6 @@ env.Prepend(CPPPATH = [
     '#src/gallium/include',
     '#src/gallium/auxiliary',
     '#src/glsl',
-    '#src/glsl/nir',
     '#src/glsl/glcpp',
 ])
 
@@ -61,12 +60,6 @@ source_lists = env.ParseSourceList('Makefile.sources')
 for l in ('LIBGLCPP_FILES', 'LIBGLSL_FILES'):
     glsl_sources += source_lists[l]
 
-# add nir/glsl_types.cpp manually, because SCons still doesn't know about NIR.
-# XXX: Remove this once we build NIR and NIR_FILES.
-glsl_sources += [
-    'nir/glsl_types.cpp',
-]
-
 if env['msvc']:
     env.Prepend(CPPPATH = ['#/src/getopt'])
     env.PrependUnique(LIBS = [getopt])
@@ -114,7 +107,7 @@ if env['platform'] == 'windows':
         'user32',
     ])
 
-env.Prepend(LIBS = [glsl])
+env.Prepend(LIBS = [glsl, compiler])
 
 glsl_compiler = env.Program(
     target = 'glsl_compiler',
diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp
index ca7a9a1..f5baeb9 100644
--- a/src/glsl/ast_array_index.cpp
+++ b/src/glsl/ast_array_index.cpp
@@ -22,7 +22,7 @@
  */
 
 #include "ast.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "ir.h"
 
 void
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 466ece6..b93aeda 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -23,7 +23,7 @@
 
 #include "glsl_symbol_table.h"
 #include "ast.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "ir.h"
 #include "main/core.h" /* for MIN2 */
 #include "main/shaderobj.h"
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 8fcda63..c6ae5cc 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -52,7 +52,7 @@
 #include "glsl_symbol_table.h"
 #include "glsl_parser_extras.h"
 #include "ast.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "program/hash_table.h"
 #include "main/shaderobj.h"
 #include "ir.h"
diff --git a/src/glsl/builtin_types.cpp b/src/glsl/builtin_types.cpp
index 4402e28..ee24bd5 100644
--- a/src/glsl/builtin_types.cpp
+++ b/src/glsl/builtin_types.cpp
@@ -34,7 +34,7 @@
  * version and set of enabled extensions.
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "glsl_parser_extras.h"
 #include "util/macros.h"
 
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 5a8f980..1d27807 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -31,7 +31,7 @@
 
 #include "ast.h"
 #include "glsl_parser_extras.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "main/context.h"
 
 #ifdef _MSC_VER
diff --git a/src/glsl/hir_field_selection.cpp b/src/glsl/hir_field_selection.cpp
index 337095b..0969661 100644
--- a/src/glsl/hir_field_selection.cpp
+++ b/src/glsl/hir_field_selection.cpp
@@ -24,7 +24,7 @@
 #include "ir.h"
 #include "glsl_parser_extras.h"
 #include "ast.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 ir_rvalue *
 _mesa_ast_field_selection_to_hir(const ast_expression *expr,
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index ca520f5..c73819e 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -23,7 +23,7 @@
 #include <string.h>
 #include "main/core.h" /* for MAX2 */
 #include "ir.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 ir_rvalue::ir_rvalue(enum ir_node_type t)
    : ir_instruction(t)
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index e1109ee..61a24ee 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -30,7 +30,7 @@
 #include <stdlib.h>
 
 #include "util/ralloc.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "list.h"
 #include "ir_visitor.h"
 #include "ir_hierarchical_visitor.h"
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
index bee60a2..0965b0d 100644
--- a/src/glsl/ir_clone.cpp
+++ b/src/glsl/ir_clone.cpp
@@ -24,7 +24,7 @@
 #include <string.h>
 #include "main/compiler.h"
 #include "ir.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "program/hash_table.h"
 
 ir_rvalue *
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 67ed360..cd97425 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -38,7 +38,7 @@
 #include "util/rounding.h" /* for _mesa_roundeven */
 #include "util/half_float.h"
 #include "ir.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "program/hash_table.h"
 
 #if defined(__SUNPRO_CC) && !defined(isnormal)
diff --git a/src/glsl/ir_function.cpp b/src/glsl/ir_function.cpp
index 93034be..0b4cb4b 100644
--- a/src/glsl/ir_function.cpp
+++ b/src/glsl/ir_function.cpp
@@ -21,7 +21,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "ir.h"
 #include "glsl_parser_extras.h"
 #include "main/errors.h"
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index fd7bc2e..960b23f 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -22,7 +22,7 @@
  */
 
 #include "ir_print_visitor.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "glsl_parser_extras.h"
 #include "main/macros.h"
 #include "util/hash_table.h"
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index 7c0af1b..15315aa 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -23,7 +23,7 @@
 
 #include "ir_reader.h"
 #include "glsl_parser_extras.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "s_expression.h"
 
 static const bool debug = false;
diff --git a/src/glsl/ir_rvalue_visitor.cpp b/src/glsl/ir_rvalue_visitor.cpp
index 6486838..6ab6cf0 100644
--- a/src/glsl/ir_rvalue_visitor.cpp
+++ b/src/glsl/ir_rvalue_visitor.cpp
@@ -32,7 +32,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_rvalue_visitor.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 ir_visitor_status
 ir_rvalue_base_visitor::rvalue_visit(ir_expression *ir)
diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index d7c29b0..e61cbc5 100644
--- a/src/glsl/ir_set_program_inouts.cpp
+++ b/src/glsl/ir_set_program_inouts.cpp
@@ -40,7 +40,7 @@
 #include "main/core.h" /* for struct gl_program */
 #include "ir.h"
 #include "ir_visitor.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index e63b5c3..e35ea85 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -37,7 +37,7 @@
 #include "ir_hierarchical_visitor.h"
 #include "util/hash_table.h"
 #include "util/set.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/ir_variable_refcount.cpp b/src/glsl/ir_variable_refcount.cpp
index 790627b..8306be1 100644
--- a/src/glsl/ir_variable_refcount.cpp
+++ b/src/glsl/ir_variable_refcount.cpp
@@ -32,7 +32,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_variable_refcount.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "util/hash_table.h"
 
 ir_variable_refcount_visitor::ir_variable_refcount_visitor()
diff --git a/src/glsl/ir_variable_refcount.h b/src/glsl/ir_variable_refcount.h
index 5c74c31..08a11c0 100644
--- a/src/glsl/ir_variable_refcount.h
+++ b/src/glsl/ir_variable_refcount.h
@@ -31,7 +31,7 @@
 
 #include "ir.h"
 #include "ir_visitor.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 struct assignment_entry {
    exec_node link;
diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp
index 21d46eb..096a80a 100644
--- a/src/glsl/loop_analysis.cpp
+++ b/src/glsl/loop_analysis.cpp
@@ -21,7 +21,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "loop_analysis.h"
 #include "ir_hierarchical_visitor.h"
 
diff --git a/src/glsl/loop_controls.cpp b/src/glsl/loop_controls.cpp
index 51804bb..c717605 100644
--- a/src/glsl/loop_controls.cpp
+++ b/src/glsl/loop_controls.cpp
@@ -23,7 +23,7 @@
 
 #include <limits.h>
 #include "main/compiler.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "loop_analysis.h"
 #include "ir_hierarchical_visitor.h"
 
diff --git a/src/glsl/loop_unroll.cpp b/src/glsl/loop_unroll.cpp
index b9ea350..aea2743c 100644
--- a/src/glsl/loop_unroll.cpp
+++ b/src/glsl/loop_unroll.cpp
@@ -21,7 +21,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "loop_analysis.h"
 #include "ir_hierarchical_visitor.h"
 
diff --git a/src/glsl/lower_const_arrays_to_uniforms.cpp b/src/glsl/lower_const_arrays_to_uniforms.cpp
index 44967dc..2d024d4 100644
--- a/src/glsl/lower_const_arrays_to_uniforms.cpp
+++ b/src/glsl/lower_const_arrays_to_uniforms.cpp
@@ -40,7 +40,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_rvalue_visitor.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 class lower_const_array_visitor : public ir_rvalue_visitor {
diff --git a/src/glsl/lower_discard.cpp b/src/glsl/lower_discard.cpp
index b44d2a6..b62eb20 100644
--- a/src/glsl/lower_discard.cpp
+++ b/src/glsl/lower_discard.cpp
@@ -105,7 +105,7 @@
  * Unconditional discards are treated as having a condition of "true".
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "ir.h"
 
 namespace {
diff --git a/src/glsl/lower_discard_flow.cpp b/src/glsl/lower_discard_flow.cpp
index ee45bf2..9d0a56b 100644
--- a/src/glsl/lower_discard_flow.cpp
+++ b/src/glsl/lower_discard_flow.cpp
@@ -44,7 +44,7 @@
  * interpretation.
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "ir.h"
 #include "program/hash_table.h"
 
diff --git a/src/glsl/lower_if_to_cond_assign.cpp b/src/glsl/lower_if_to_cond_assign.cpp
index 3232ce9..6a70347 100644
--- a/src/glsl/lower_if_to_cond_assign.cpp
+++ b/src/glsl/lower_if_to_cond_assign.cpp
@@ -45,7 +45,7 @@
  * to attempt to flatten any if-statements appearing at depth > N.
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "ir.h"
 #include "program/hash_table.h"
 
diff --git a/src/glsl/lower_instructions.cpp b/src/glsl/lower_instructions.cpp
index 845cfff..57b09d4 100644
--- a/src/glsl/lower_instructions.cpp
+++ b/src/glsl/lower_instructions.cpp
@@ -126,7 +126,7 @@
 
 #include "c99_math.h"
 #include "program/prog_instruction.h" /* for swizzle */
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "ir.h"
 #include "ir_builder.h"
 #include "ir_optimization.h"
diff --git a/src/glsl/lower_jumps.cpp b/src/glsl/lower_jumps.cpp
index ec7a0c5..3cfa2e0 100644
--- a/src/glsl/lower_jumps.cpp
+++ b/src/glsl/lower_jumps.cpp
@@ -56,7 +56,7 @@
  * prevents further optimization, and thus is not currently performed.
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include <string.h>
 #include "ir.h"
 
diff --git a/src/glsl/lower_mat_op_to_vec.cpp b/src/glsl/lower_mat_op_to_vec.cpp
index dda754f..d826630 100644
--- a/src/glsl/lower_mat_op_to_vec.cpp
+++ b/src/glsl/lower_mat_op_to_vec.cpp
@@ -33,7 +33,7 @@
 
 #include "ir.h"
 #include "ir_expression_flattening.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/lower_offset_array.cpp b/src/glsl/lower_offset_array.cpp
index c30f801..96486c3 100644
--- a/src/glsl/lower_offset_array.cpp
+++ b/src/glsl/lower_offset_array.cpp
@@ -31,7 +31,7 @@
  * \author Chris Forbes <chrisf at ijw.co.nz>
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "ir.h"
 #include "ir_builder.h"
 #include "ir_optimization.h"
diff --git a/src/glsl/lower_subroutine.cpp b/src/glsl/lower_subroutine.cpp
index a0df5e1..11572d9 100644
--- a/src/glsl/lower_subroutine.cpp
+++ b/src/glsl/lower_subroutine.cpp
@@ -27,7 +27,7 @@
  * lowers subroutines to an if ladder.
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "glsl_parser_extras.h"
 #include "ir.h"
 #include "ir_builder.h"
diff --git a/src/glsl/lower_variable_index_to_cond_assign.cpp b/src/glsl/lower_variable_index_to_cond_assign.cpp
index 1ab3afe..1653205 100644
--- a/src/glsl/lower_variable_index_to_cond_assign.cpp
+++ b/src/glsl/lower_variable_index_to_cond_assign.cpp
@@ -49,7 +49,7 @@
 #include "ir.h"
 #include "ir_rvalue_visitor.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "main/macros.h"
 
 /**
diff --git a/src/glsl/lower_vec_index_to_cond_assign.cpp b/src/glsl/lower_vec_index_to_cond_assign.cpp
index b623882..784db08 100644
--- a/src/glsl/lower_vec_index_to_cond_assign.cpp
+++ b/src/glsl/lower_vec_index_to_cond_assign.cpp
@@ -39,7 +39,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/lower_vec_index_to_swizzle.cpp b/src/glsl/lower_vec_index_to_swizzle.cpp
index 4d4d2f1..8b18e95 100644
--- a/src/glsl/lower_vec_index_to_swizzle.cpp
+++ b/src/glsl/lower_vec_index_to_swizzle.cpp
@@ -32,7 +32,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "main/macros.h"
 
 /**
diff --git a/src/glsl/nir/nir_types.h b/src/glsl/nir/nir_types.h
index b0b5184..572cff2 100644
--- a/src/glsl/nir/nir_types.h
+++ b/src/glsl/nir/nir_types.h
@@ -29,9 +29,9 @@
 
 #include <stdio.h>
 
-/* C wrapper around glsl_types.h */
+/* C wrapper around compiler/glsl_types.h */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index c4b8715..1e58062 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/src/glsl/opt_algebraic.cpp
@@ -33,7 +33,7 @@
 #include "ir_rvalue_visitor.h"
 #include "ir_optimization.h"
 #include "ir_builder.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 using namespace ir_builder;
 
diff --git a/src/glsl/opt_array_splitting.cpp b/src/glsl/opt_array_splitting.cpp
index 89ce76b..cceec6b 100644
--- a/src/glsl/opt_array_splitting.cpp
+++ b/src/glsl/opt_array_splitting.cpp
@@ -36,7 +36,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_rvalue_visitor.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 static bool debug = false;
 
diff --git a/src/glsl/opt_conditional_discard.cpp b/src/glsl/opt_conditional_discard.cpp
index 8a3ad24..1ca8803 100644
--- a/src/glsl/opt_conditional_discard.cpp
+++ b/src/glsl/opt_conditional_discard.cpp
@@ -33,7 +33,7 @@
  *    (discard <condition>)
  */
 
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "ir.h"
 
 namespace {
diff --git a/src/glsl/opt_constant_folding.cpp b/src/glsl/opt_constant_folding.cpp
index 4aae3f0..150a17b 100644
--- a/src/glsl/opt_constant_folding.cpp
+++ b/src/glsl/opt_constant_folding.cpp
@@ -30,7 +30,7 @@
 #include "ir_visitor.h"
 #include "ir_rvalue_visitor.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/opt_constant_propagation.cpp b/src/glsl/opt_constant_propagation.cpp
index 184aaa1..0ffccc4 100644
--- a/src/glsl/opt_constant_propagation.cpp
+++ b/src/glsl/opt_constant_propagation.cpp
@@ -39,7 +39,7 @@
 #include "ir_rvalue_visitor.h"
 #include "ir_basic_block.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "util/hash_table.h"
 
 namespace {
diff --git a/src/glsl/opt_constant_variable.cpp b/src/glsl/opt_constant_variable.cpp
index cdfbc34..18fe194 100644
--- a/src/glsl/opt_constant_variable.cpp
+++ b/src/glsl/opt_constant_variable.cpp
@@ -35,7 +35,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "util/hash_table.h"
 
 namespace {
diff --git a/src/glsl/opt_copy_propagation.cpp b/src/glsl/opt_copy_propagation.cpp
index f206995..63bb8e3 100644
--- a/src/glsl/opt_copy_propagation.cpp
+++ b/src/glsl/opt_copy_propagation.cpp
@@ -36,7 +36,7 @@
 #include "ir_visitor.h"
 #include "ir_basic_block.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/opt_copy_propagation_elements.cpp b/src/glsl/opt_copy_propagation_elements.cpp
index 353a5c6..a679180 100644
--- a/src/glsl/opt_copy_propagation_elements.cpp
+++ b/src/glsl/opt_copy_propagation_elements.cpp
@@ -45,7 +45,7 @@
 #include "ir_rvalue_visitor.h"
 #include "ir_basic_block.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 static bool debug = false;
 
diff --git a/src/glsl/opt_dead_builtin_varyings.cpp b/src/glsl/opt_dead_builtin_varyings.cpp
index 68b70ee..5c3fb76 100644
--- a/src/glsl/opt_dead_builtin_varyings.cpp
+++ b/src/glsl/opt_dead_builtin_varyings.cpp
@@ -51,7 +51,7 @@
 #include "ir_rvalue_visitor.h"
 #include "ir_optimization.h"
 #include "ir_print_visitor.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "link_varyings.h"
 
 namespace {
diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp
index c5be166..19a4bdc 100644
--- a/src/glsl/opt_dead_code.cpp
+++ b/src/glsl/opt_dead_code.cpp
@@ -30,7 +30,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_variable_refcount.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "util/hash_table.h"
 
 static bool debug = false;
diff --git a/src/glsl/opt_dead_code_local.cpp b/src/glsl/opt_dead_code_local.cpp
index ee9f22c..d38fd2b 100644
--- a/src/glsl/opt_dead_code_local.cpp
+++ b/src/glsl/opt_dead_code_local.cpp
@@ -36,7 +36,7 @@
 #include "ir.h"
 #include "ir_basic_block.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 static bool debug = false;
 
diff --git a/src/glsl/opt_dead_functions.cpp b/src/glsl/opt_dead_functions.cpp
index 5dff165..2e90b65 100644
--- a/src/glsl/opt_dead_functions.cpp
+++ b/src/glsl/opt_dead_functions.cpp
@@ -30,7 +30,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_expression_flattening.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/opt_function_inlining.cpp b/src/glsl/opt_function_inlining.cpp
index 84a9e4f..19f5fae 100644
--- a/src/glsl/opt_function_inlining.cpp
+++ b/src/glsl/opt_function_inlining.cpp
@@ -31,7 +31,7 @@
 #include "ir_visitor.h"
 #include "ir_function_inlining.h"
 #include "ir_expression_flattening.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "program/hash_table.h"
 
 static void
diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp
index 23d0b10..29482ee 100644
--- a/src/glsl/opt_minmax.cpp
+++ b/src/glsl/opt_minmax.cpp
@@ -36,7 +36,7 @@
 #include "ir_optimization.h"
 #include "ir_builder.h"
 #include "program/prog_instruction.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "main/macros.h"
 
 using namespace ir_builder;
diff --git a/src/glsl/opt_noop_swizzle.cpp b/src/glsl/opt_noop_swizzle.cpp
index 586ad5e..41890ab 100644
--- a/src/glsl/opt_noop_swizzle.cpp
+++ b/src/glsl/opt_noop_swizzle.cpp
@@ -32,7 +32,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_rvalue_visitor.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp
index abf4310..0d18a2f 100644
--- a/src/glsl/opt_structure_splitting.cpp
+++ b/src/glsl/opt_structure_splitting.cpp
@@ -35,7 +35,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_rvalue_visitor.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/opt_swizzle_swizzle.cpp b/src/glsl/opt_swizzle_swizzle.cpp
index 7564c6b..7285474 100644
--- a/src/glsl/opt_swizzle_swizzle.cpp
+++ b/src/glsl/opt_swizzle_swizzle.cpp
@@ -30,7 +30,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/opt_tree_grafting.cpp b/src/glsl/opt_tree_grafting.cpp
index cd58213..83effb7 100644
--- a/src/glsl/opt_tree_grafting.cpp
+++ b/src/glsl/opt_tree_grafting.cpp
@@ -52,7 +52,7 @@
 #include "ir_variable_refcount.h"
 #include "ir_basic_block.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 
 namespace {
 
diff --git a/src/glsl/opt_vectorize.cpp b/src/glsl/opt_vectorize.cpp
index 2f71a83..88318cd 100644
--- a/src/glsl/opt_vectorize.cpp
+++ b/src/glsl/opt_vectorize.cpp
@@ -55,7 +55,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_optimization.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "program/prog_instruction.h"
 
 namespace {
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index c986326..5b80a21 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -16,7 +16,6 @@ env.Append(CPPPATH = [
     '#/src',
     '#/src/mapi',
     '#/src/glsl',
-    '#/src/glsl/nir',
     '#/src/mesa',
     '#/src/gallium/include',
     '#/src/gallium/auxiliary',
diff --git a/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp b/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
index 33d2048..3d6aa74 100644
--- a/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
@@ -30,7 +30,7 @@
  * \author Eric Anholt <eric at anholt.net>
  */
 
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "glsl/ir.h"
 #include "program/prog_instruction.h" /* For WRITEMASK_* */
 
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 7904f4d..c25e3bf 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -38,7 +38,7 @@
 #include "brw_cfg.h"
 #include "brw_program.h"
 #include "brw_dead_control_flow.h"
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 
 using namespace brw;
 
diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
index b3fb0c6..9be1498 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
@@ -43,7 +43,7 @@
 
 #include "glsl/ir.h"
 #include "glsl/ir_expression_flattening.h"
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 
 class ir_channel_expressions_visitor : public ir_hierarchical_visitor {
 public:
diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
index b7bad29..fb434d5 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
@@ -40,7 +40,7 @@
 #include "main/imports.h"
 #include "glsl/ir.h"
 #include "glsl/ir_rvalue_visitor.h"
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "util/hash_table.h"
 
 static bool debug = false;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 640e047..2ba542c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -28,7 +28,7 @@
  * in the GLSL IR or in the native code.
  */
 #include "brw_fs.h"
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 
 using namespace brw;
 
diff --git a/src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp b/src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp
index 4219d47..eafbdf6 100644
--- a/src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp
+++ b/src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp
@@ -31,7 +31,7 @@
  * \author Chris Forbes <chrisf at ijw.co.nz>
  */
 
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "glsl/ir.h"
 #include "glsl/ir_builder.h"
 
diff --git a/src/mesa/drivers/x11/SConscript b/src/mesa/drivers/x11/SConscript
index d29f987..91245eb 100644
--- a/src/mesa/drivers/x11/SConscript
+++ b/src/mesa/drivers/x11/SConscript
@@ -19,6 +19,7 @@ env.Prepend(LIBS = [
     glapi,
     mesautil,
     glsl,
+    compiler,
     mesa,
 ])
 
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index e63d0f1..b2b1ee9 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -40,7 +40,7 @@
 #include "glsl/ir_optimization.h"
 #include "glsl/glsl_parser_extras.h"
 #include "glsl/glsl_symbol_table.h"
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "program/ir_to_mesa.h"
 #include "program/program.h"
 #include "program/programopt.h"
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 758ca24..8457b27 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -44,7 +44,7 @@
 #include "main/uniforms.h"
 #include "main/enums.h"
 #include "ir_uniform.h"
-#include "glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "program/program.h"
 
 /**
diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h
index 2f88b65..baf49a7 100644
--- a/src/mesa/main/uniforms.h
+++ b/src/mesa/main/uniforms.h
@@ -27,7 +27,7 @@
 #define UNIFORMS_H
 
 #include "main/glheader.h"
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "glsl/ir_uniform.h"
 #include "program/prog_parameter.h"
 
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index a0a42da..d662d61 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -42,7 +42,7 @@
 #include "glsl/ir_optimization.h"
 #include "glsl/ir_uniform.h"
 #include "glsl/glsl_parser_extras.h"
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "glsl/linker.h"
 #include "glsl/program.h"
 #include "program/hash_table.h"
diff --git a/src/mesa/program/sampler.cpp b/src/mesa/program/sampler.cpp
index 84e2504..9137d18 100644
--- a/src/mesa/program/sampler.cpp
+++ b/src/mesa/program/sampler.cpp
@@ -24,7 +24,7 @@
  */
 
 #include "main/mtypes.h"
-#include "glsl/nir/glsl_types.h"
+#include "compiler/glsl_types.h"
 #include "glsl/ir.h"
 #include "glsl/ir_uniform.h"
 #include "glsl/ir_visitor.h"
-- 
2.6.2



More information about the mesa-dev mailing list