summaryrefslogtreecommitdiff
path: root/src/glsl
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-08-23 17:51:42 +0800
committerChia-I Wu <olv@lunarg.com>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 f85b308c1b..34b0f70d41 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 57e331742e..64b142fa35 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 5471ba6020..a277ed6e8d 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 2ec7d621bb..a7dbe480e9 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 2a763d784b..c72b5b3bc1 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 2c04d7d71b..91eb0bf972 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 3275496d99..3c28edf688 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 b864218d50..bc56e4fcaf 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 c488f5c271..1da2fd76de 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 23045ff182..3c33127b5f 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 4622a1f939..e5ed10d3e4 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 942f198360..f1c175c97a 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 9bf8271081..78694a2029 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 534f602128..b3f1cc0d8b 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 917c06743b..e638c9602f 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 dfda05fcbe..6374573e61 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 38d19c4c71..c5c8c9cdd6 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 ea2c4ab0dd..893169b6cc 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);