From bfd7c9ac228c7ed8aec04c3b3aa33f40ee00b035 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 23 Aug 2010 17:51:42 +0800 Subject: [PATCH] glsl: Include main/core.h. Make glsl include only main/core.h from core mesa. --- src/glsl/ast_function.cpp | 2 +- src/glsl/ast_to_hir.cpp | 3 +-- src/glsl/builtin_function.cpp | 2 +- src/glsl/builtin_variables.h | 2 +- src/glsl/builtins/tools/generate_builtins.py | 2 +- src/glsl/glcpp/glcpp-parse.c | 2 +- src/glsl/glcpp/glcpp-parse.y | 2 +- src/glsl/glsl_parser_extras.cpp | 2 +- src/glsl/glsl_types.cpp | 3 +-- src/glsl/hir_field_selection.cpp | 1 - src/glsl/ir.cpp | 3 +-- src/glsl/ir_constant_expression.cpp | 2 +- src/glsl/ir_explog_to_explog2.cpp | 2 +- src/glsl/ir_set_program_inouts.cpp | 2 +- src/glsl/ir_variable.cpp | 1 - src/glsl/link_functions.cpp | 2 +- src/glsl/linker.cpp | 5 +---- src/glsl/program.h | 8 +------- 18 files changed, 16 insertions(+), 30 deletions(-) diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index f85b308c1bf..34b0f70d41e 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -25,7 +25,7 @@ #include "ast.h" #include "glsl_types.h" #include "ir.h" -#include "main/macros.h" +#include "main/core.h" /* for MIN2 */ static ir_rvalue * convert_component(ir_rvalue *src, const glsl_type *desired_type); diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 57e331742ea..64b142fa35d 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -49,8 +49,7 @@ * parser (and lexer) sources. */ -#include "main/imports.h" -#include "main/extensions.h" +#include "main/core.h" /* for struct gl_extensions */ #include "glsl_symbol_table.h" #include "glsl_parser_extras.h" #include "ast.h" diff --git a/src/glsl/builtin_function.cpp b/src/glsl/builtin_function.cpp index 5471ba6020f..a277ed6e8d9 100644 --- a/src/glsl/builtin_function.cpp +++ b/src/glsl/builtin_function.cpp @@ -23,7 +23,7 @@ */ #include -#include "main/compiler.h" +#include "main/core.h" /* for struct gl_shader */ #include "glsl_parser_extras.h" #include "ir_reader.h" #include "program.h" diff --git a/src/glsl/builtin_variables.h b/src/glsl/builtin_variables.h index 2ec7d621bbf..a7dbe480e96 100644 --- a/src/glsl/builtin_variables.h +++ b/src/glsl/builtin_variables.h @@ -21,7 +21,7 @@ * DEALINGS IN THE SOFTWARE. */ -#include "main/mtypes.h" +#include "main/core.h" /* for slot numbers */ struct builtin_variable { enum ir_variable_mode mode; diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py index 2a763d784b4..c72b5b3bc1c 100755 --- a/src/glsl/builtins/tools/generate_builtins.py +++ b/src/glsl/builtins/tools/generate_builtins.py @@ -116,7 +116,7 @@ if __name__ == "__main__": */ #include -#include "main/compiler.h" +#include "main/core.h" /* for struct gl_shader */ #include "glsl_parser_extras.h" #include "ir_reader.h" #include "program.h" diff --git a/src/glsl/glcpp/glcpp-parse.c b/src/glsl/glcpp/glcpp-parse.c index 2c04d7d71bd..91eb0bf9720 100644 --- a/src/glsl/glcpp/glcpp-parse.c +++ b/src/glsl/glcpp/glcpp-parse.c @@ -100,7 +100,7 @@ #include #include "glcpp.h" -#include "main/mtypes.h" +#include "main/core.h" /* for struct gl_extensions */ #define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str) #define glcpp_printf(stream, fmt, args, ...) \ diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 3275496d99a..3c28edf688b 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -29,7 +29,7 @@ #include #include "glcpp.h" -#include "main/mtypes.h" +#include "main/core.h" /* for struct gl_extensions */ #define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str) #define glcpp_printf(stream, fmt, args, ...) \ diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index b864218d50d..bc56e4fcaf5 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -27,7 +27,7 @@ extern "C" { #include -#include "main/mtypes.h" +#include "main/core.h" /* for struct __GLcontextRec */ } #include "ast.h" diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp index c488f5c2715..1da2fd76dee 100644 --- a/src/glsl/glsl_types.cpp +++ b/src/glsl/glsl_types.cpp @@ -23,13 +23,12 @@ #include #include -#include "main/compiler.h" +#include "main/core.h" /* for Elements */ #include "glsl_symbol_table.h" #include "glsl_parser_extras.h" #include "glsl_types.h" #include "builtin_types.h" extern "C" { -#include "main/imports.h" #include "program/hash_table.h" } diff --git a/src/glsl/hir_field_selection.cpp b/src/glsl/hir_field_selection.cpp index 23045ff1827..3c33127b5f8 100644 --- a/src/glsl/hir_field_selection.cpp +++ b/src/glsl/hir_field_selection.cpp @@ -22,7 +22,6 @@ */ #include "ir.h" -#include "main/imports.h" #include "program/symbol_table.h" #include "glsl_parser_extras.h" #include "ast.h" diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 4622a1f939b..e5ed10d3e42 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -21,8 +21,7 @@ * DEALINGS IN THE SOFTWARE. */ #include -#include "main/imports.h" -#include "main/macros.h" +#include "main/core.h" /* for MAX2 */ #include "ir.h" #include "ir_visitor.h" #include "glsl_types.h" diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index 942f1983607..f1c175c97aa 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl/ir_constant_expression.cpp @@ -34,7 +34,7 @@ */ #include -#include "main/macros.h" +#include "main/core.h" /* for MAX2, MIN2, CLAMP */ #include "ir.h" #include "ir_visitor.h" #include "glsl_types.h" diff --git a/src/glsl/ir_explog_to_explog2.cpp b/src/glsl/ir_explog_to_explog2.cpp index 9bf82710812..78694a2029d 100644 --- a/src/glsl/ir_explog_to_explog2.cpp +++ b/src/glsl/ir_explog_to_explog2.cpp @@ -29,7 +29,7 @@ * and log2 operations. */ -#include "main/imports.h" +#include "main/core.h" /* for log2f on MSVC */ #include "ir.h" #include "glsl_types.h" diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp index 534f602128b..b3f1cc0d8b5 100644 --- a/src/glsl/ir_set_program_inouts.cpp +++ b/src/glsl/ir_set_program_inouts.cpp @@ -35,7 +35,7 @@ */ extern "C" { -#include "main/mtypes.h" +#include "main/core.h" /* for struct gl_program */ #include "program/hash_table.h" } #include "ir.h" diff --git a/src/glsl/ir_variable.cpp b/src/glsl/ir_variable.cpp index 917c06743b4..e638c9602f0 100644 --- a/src/glsl/ir_variable.cpp +++ b/src/glsl/ir_variable.cpp @@ -21,7 +21,6 @@ * DEALINGS IN THE SOFTWARE. */ -#include "main/compiler.h" #include "ir.h" #include "glsl_parser_extras.h" #include "glsl_symbol_table.h" diff --git a/src/glsl/link_functions.cpp b/src/glsl/link_functions.cpp index dfda05fcbe5..6374573e614 100644 --- a/src/glsl/link_functions.cpp +++ b/src/glsl/link_functions.cpp @@ -29,7 +29,7 @@ extern "C" { #include } -#include "main/mtypes.h" +#include "main/core.h" #include "glsl_symbol_table.h" #include "glsl_parser_extras.h" #include "ir.h" diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 38d19c4c711..c5c8c9cdd63 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -72,10 +72,7 @@ extern "C" { #include } -#include "main/compiler.h" -#include "main/mtypes.h" -#include "main/macros.h" -#include "main/shaderobj.h" +#include "main/core.h" #include "glsl_symbol_table.h" #include "ir.h" #include "program.h" diff --git a/src/glsl/program.h b/src/glsl/program.h index ea2c4ab0dda..893169b6cc2 100644 --- a/src/glsl/program.h +++ b/src/glsl/program.h @@ -21,13 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include "main/mtypes.h" - -extern "C" { -#include "program/prog_parameter.h" -#include "program/prog_uniform.h" -} +#include "main/core.h" extern void link_shaders(GLcontext *ctx, struct gl_shader_program *prog); -- 2.30.2