aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-08-23 17:51:42 +0800
committerChia-I Wu <[email protected]>2010-08-24 11:27:29 +0800
commitbfd7c9ac228c7ed8aec04c3b3aa33f40ee00b035 (patch)
tree253e93215989a58b0ec088b7fad095766e3cab80 /src/glsl
parentf90b5936d07c4c8f280318ab5cf5894ecb67aef6 (diff)
glsl: Include main/core.h.
Make glsl include only main/core.h from core mesa.
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ast_function.cpp2
-rw-r--r--src/glsl/ast_to_hir.cpp3
-rw-r--r--src/glsl/builtin_function.cpp2
-rw-r--r--src/glsl/builtin_variables.h2
-rwxr-xr-xsrc/glsl/builtins/tools/generate_builtins.py2
-rw-r--r--src/glsl/glcpp/glcpp-parse.c2
-rw-r--r--src/glsl/glcpp/glcpp-parse.y2
-rw-r--r--src/glsl/glsl_parser_extras.cpp2
-rw-r--r--src/glsl/glsl_types.cpp3
-rw-r--r--src/glsl/hir_field_selection.cpp1
-rw-r--r--src/glsl/ir.cpp3
-rw-r--r--src/glsl/ir_constant_expression.cpp2
-rw-r--r--src/glsl/ir_explog_to_explog2.cpp2
-rw-r--r--src/glsl/ir_set_program_inouts.cpp2
-rw-r--r--src/glsl/ir_variable.cpp1
-rw-r--r--src/glsl/link_functions.cpp2
-rw-r--r--src/glsl/linker.cpp5
-rw-r--r--src/glsl/program.h8
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 <stdio.h>
-#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 <stdio.h>
-#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 <inttypes.h>
#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 <inttypes.h>
#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 <talloc.h>
-#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 <cstdio>
#include <stdlib.h>
-#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 <string.h>
-#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 <math.h>
-#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 <talloc.h>
}
-#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 <talloc.h>
}
-#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 <GL/gl.h>
-#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);