summaryrefslogtreecommitdiff
path: root/src/mesa/slang
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/slang')
-rw-r--r--src/mesa/slang/slang_builtin.c4
-rw-r--r--src/mesa/slang/slang_builtin.h4
-rw-r--r--src/mesa/slang/slang_codegen.h7
-rw-r--r--src/mesa/slang/slang_compile.c1
-rw-r--r--src/mesa/slang/slang_compile.h11
-rw-r--r--src/mesa/slang/slang_compile_function.h8
-rw-r--r--src/mesa/slang/slang_compile_operation.h5
-rw-r--r--src/mesa/slang/slang_compile_struct.h3
-rw-r--r--src/mesa/slang/slang_compile_variable.h4
-rw-r--r--src/mesa/slang/slang_emit.h6
-rw-r--r--src/mesa/slang/slang_ir.h7
-rw-r--r--src/mesa/slang/slang_label.c3
-rw-r--r--src/mesa/slang/slang_label.h5
-rw-r--r--src/mesa/slang/slang_link.c17
-rw-r--r--src/mesa/slang/slang_link.h2
-rw-r--r--src/mesa/slang/slang_log.h2
-rw-r--r--src/mesa/slang/slang_mem.h2
-rw-r--r--src/mesa/slang/slang_print.h6
-rw-r--r--src/mesa/slang/slang_simplify.h7
-rw-r--r--src/mesa/slang/slang_storage.h7
-rw-r--r--src/mesa/slang/slang_typeinfo.h4
-rw-r--r--src/mesa/slang/slang_utility.h2
-rw-r--r--src/mesa/slang/slang_vartable.h3
23 files changed, 86 insertions, 34 deletions
diff --git a/src/mesa/slang/slang_builtin.c b/src/mesa/slang/slang_builtin.c
index a7e0efcb7b..179571fab4 100644
--- a/src/mesa/slang/slang_builtin.c
+++ b/src/mesa/slang/slang_builtin.c
@@ -35,8 +35,10 @@
#include "program/prog_instruction.h"
#include "program/prog_parameter.h"
#include "program/prog_statevars.h"
-#include "slang/slang_ir.h"
#include "slang/slang_builtin.h"
+#include "slang/slang_compile_struct.h"
+#include "slang/slang_ir.h"
+#include "slang/slang_typeinfo.h"
/** special state token (see below) */
diff --git a/src/mesa/slang/slang_builtin.h b/src/mesa/slang/slang_builtin.h
index ed9ae80b3c..dc92f83f8e 100644
--- a/src/mesa/slang/slang_builtin.h
+++ b/src/mesa/slang/slang_builtin.h
@@ -26,8 +26,8 @@
#ifndef SLANG_BUILTIN_H
#define SLANG_BUILTIN_H
-#include "program/prog_parameter.h"
-#include "slang_utility.h"
+#include "main/glheader.h"
+#include "main/mtypes.h"
#include "slang_ir.h"
diff --git a/src/mesa/slang/slang_codegen.h b/src/mesa/slang/slang_codegen.h
index 461633fe34..376a8cc264 100644
--- a/src/mesa/slang/slang_codegen.h
+++ b/src/mesa/slang/slang_codegen.h
@@ -27,9 +27,14 @@
#define SLANG_CODEGEN_H
-#include "main/imports.h"
+#include "main/glheader.h"
#include "slang_compile.h"
+#include "slang_compile_variable.h"
+#include "slang_typeinfo.h"
+#include "slang_utility.h"
+#include "slang_vartable.h"
+struct slang_function_;
#define MAX_LOOP_DEPTH 30
diff --git a/src/mesa/slang/slang_compile.c b/src/mesa/slang/slang_compile.c
index 12ab4666ae..de1bb56cd9 100644
--- a/src/mesa/slang/slang_compile.c
+++ b/src/mesa/slang/slang_compile.c
@@ -36,6 +36,7 @@
#include "program/prog_print.h"
#include "program/prog_parameter.h"
#include "../../glsl/pp/sl_pp_public.h"
+#include "../../glsl/pp/sl_pp_purify.h"
#include "../../glsl/cl/sl_cl_parse.h"
#include "slang_codegen.h"
#include "slang_compile.h"
diff --git a/src/mesa/slang/slang_compile.h b/src/mesa/slang/slang_compile.h
index 71fcaa3993..6061f878e7 100644
--- a/src/mesa/slang/slang_compile.h
+++ b/src/mesa/slang/slang_compile.h
@@ -25,13 +25,14 @@
#if !defined SLANG_COMPILE_H
#define SLANG_COMPILE_H
-#include "main/imports.h"
+#include "main/glheader.h"
#include "main/mtypes.h"
-#include "slang_typeinfo.h"
-#include "slang_compile_variable.h"
-#include "slang_compile_struct.h"
-#include "slang_compile_operation.h"
#include "slang_compile_function.h"
+#include "slang_compile_struct.h"
+#include "slang_compile_variable.h"
+#include "slang_utility.h"
+
+struct slang_code_object_;
#if defined __cplusplus
extern "C" {
diff --git a/src/mesa/slang/slang_compile_function.h b/src/mesa/slang/slang_compile_function.h
index a5445ec253..0eced3ca1a 100644
--- a/src/mesa/slang/slang_compile_function.h
+++ b/src/mesa/slang/slang_compile_function.h
@@ -25,6 +25,14 @@
#ifndef SLANG_COMPILE_FUNCTION_H
#define SLANG_COMPILE_FUNCTION_H
+#include "main/glheader.h"
+#include "slang_compile_operation.h"
+#include "slang_compile_variable.h"
+#include "slang_log.h"
+#include "slang_utility.h"
+
+struct slang_name_space_;
+struct slang_operation_;
/**
* Types of functions.
diff --git a/src/mesa/slang/slang_compile_operation.h b/src/mesa/slang/slang_compile_operation.h
index 1f15c19896..b32573e022 100644
--- a/src/mesa/slang/slang_compile_operation.h
+++ b/src/mesa/slang/slang_compile_operation.h
@@ -26,6 +26,11 @@
#define SLANG_COMPILE_OPERATION_H
+#include "main/compiler.h"
+#include "main/glheader.h"
+#include "slang_compile_variable.h"
+#include "slang_utility.h"
+
/**
* Types of slang operations.
* These are the types of the AST (abstract syntax tree) nodes.
diff --git a/src/mesa/slang/slang_compile_struct.h b/src/mesa/slang/slang_compile_struct.h
index 90c5512f4d..7be6f204e1 100644
--- a/src/mesa/slang/slang_compile_struct.h
+++ b/src/mesa/slang/slang_compile_struct.h
@@ -29,6 +29,9 @@
extern "C" {
#endif
+#include "main/glheader.h"
+#include "slang_utility.h"
+
struct slang_function_;
typedef struct slang_struct_scope_
diff --git a/src/mesa/slang/slang_compile_variable.h b/src/mesa/slang/slang_compile_variable.h
index 5c9d248b35..48dc6efca4 100644
--- a/src/mesa/slang/slang_compile_variable.h
+++ b/src/mesa/slang/slang_compile_variable.h
@@ -26,7 +26,9 @@
#define SLANG_COMPILE_VARIABLE_H
-struct slang_ir_storage_;
+#include "main/glheader.h"
+#include "slang_typeinfo.h"
+#include "slang_utility.h"
/**
diff --git a/src/mesa/slang/slang_emit.h b/src/mesa/slang/slang_emit.h
index ab4c202d67..f93d6b00d6 100644
--- a/src/mesa/slang/slang_emit.h
+++ b/src/mesa/slang/slang_emit.h
@@ -25,11 +25,9 @@
#ifndef SLANG_EMIT_H
#define SLANG_EMIT_H
-
-#include "main/imports.h"
-#include "slang_compile.h"
+#include "main/glheader.h"
#include "slang_ir.h"
-#include "main/mtypes.h"
+#include "slang_vartable.h"
extern GLuint
diff --git a/src/mesa/slang/slang_ir.h b/src/mesa/slang/slang_ir.h
index b7a373746b..a010efcb34 100644
--- a/src/mesa/slang/slang_ir.h
+++ b/src/mesa/slang/slang_ir.h
@@ -33,10 +33,11 @@
#define SLANG_IR_H
-#include "main/imports.h"
-#include "slang_compile.h"
-#include "slang_label.h"
+#include "main/glheader.h"
#include "main/mtypes.h"
+#include "program/prog_instruction.h"
+#include "slang_compile_variable.h"
+#include "slang_label.h"
/**
diff --git a/src/mesa/slang/slang_label.c b/src/mesa/slang/slang_label.c
index 8e3a8ebc1a..a161139800 100644
--- a/src/mesa/slang/slang_label.c
+++ b/src/mesa/slang/slang_label.c
@@ -7,6 +7,9 @@
*/
+#include "main/imports.h"
+#include "main/mtypes.h"
+#include "program/prog_instruction.h"
#include "slang_label.h"
#include "slang_mem.h"
diff --git a/src/mesa/slang/slang_label.h b/src/mesa/slang/slang_label.h
index 4d04df18d2..b0cff3a8e8 100644
--- a/src/mesa/slang/slang_label.h
+++ b/src/mesa/slang/slang_label.h
@@ -1,10 +1,9 @@
#ifndef SLANG_LABEL_H
#define SLANG_LABEL_H 1
-#include "main/imports.h"
-#include "main/mtypes.h"
-#include "program/prog_instruction.h"
+#include "main/glheader.h"
+struct gl_program;
struct slang_label_
{
diff --git a/src/mesa/slang/slang_link.c b/src/mesa/slang/slang_link.c
index 94db6f918d..28ad0b74e8 100644
--- a/src/mesa/slang/slang_link.c
+++ b/src/mesa/slang/slang_link.c
@@ -42,6 +42,7 @@
#include "program/prog_statevars.h"
#include "program/prog_uniform.h"
#include "slang_builtin.h"
+#include "slang_compile.h"
#include "slang_link.h"
@@ -1206,11 +1207,11 @@ _slang_link(GLcontext *ctx,
vertNotify = ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB,
&shProg->FragmentProgram->Base);
if (ctx->Shader.Flags & GLSL_DUMP) {
- printf("Mesa pre-link fragment program:\n");
+ fprintf(stderr, "Mesa pre-link fragment program:\n");
_mesa_print_program(&fragProg->Base);
_mesa_print_program_parameters(ctx, &fragProg->Base);
- printf("Mesa post-link fragment program:\n");
+ fprintf(stderr, "Mesa post-link fragment program:\n");
_mesa_print_program(&shProg->FragmentProgram->Base);
_mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base);
}
@@ -1229,11 +1230,11 @@ _slang_link(GLcontext *ctx,
geomNotify = ctx->Driver.ProgramStringNotify(ctx, MESA_GEOMETRY_PROGRAM,
&shProg->GeometryProgram->Base);
if (ctx->Shader.Flags & GLSL_DUMP) {
- printf("Mesa pre-link geometry program:\n");
+ fprintf(stderr, "Mesa pre-link geometry program:\n");
_mesa_print_program(&geomProg->Base);
_mesa_print_program_parameters(ctx, &geomProg->Base);
- printf("Mesa post-link geometry program:\n");
+ fprintf(stderr, "Mesa post-link geometry program:\n");
_mesa_print_program(&shProg->GeometryProgram->Base);
_mesa_print_program_parameters(ctx, &shProg->GeometryProgram->Base);
}
@@ -1247,11 +1248,11 @@ _slang_link(GLcontext *ctx,
fragNotify = ctx->Driver.ProgramStringNotify(ctx, GL_VERTEX_PROGRAM_ARB,
&shProg->VertexProgram->Base);
if (ctx->Shader.Flags & GLSL_DUMP) {
- printf("Mesa pre-link vertex program:\n");
+ fprintf(stderr, "Mesa pre-link vertex program:\n");
_mesa_print_program(&vertProg->Base);
_mesa_print_program_parameters(ctx, &vertProg->Base);
- printf("Mesa post-link vertex program:\n");
+ fprintf(stderr, "Mesa post-link vertex program:\n");
_mesa_print_program(&shProg->VertexProgram->Base);
_mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base);
}
@@ -1266,10 +1267,10 @@ _slang_link(GLcontext *ctx,
}
if (ctx->Shader.Flags & GLSL_DUMP) {
- printf("Varying vars:\n");
+ fprintf(stderr, "Varying vars:\n");
_mesa_print_parameter_list(shProg->Varying);
if (shProg->InfoLog) {
- printf("Info Log: %s\n", shProg->InfoLog);
+ fprintf(stderr, "Info Log: %s\n", shProg->InfoLog);
}
}
diff --git a/src/mesa/slang/slang_link.h b/src/mesa/slang/slang_link.h
index 2b44d20787..3e9fa2d743 100644
--- a/src/mesa/slang/slang_link.h
+++ b/src/mesa/slang/slang_link.h
@@ -25,7 +25,7 @@
#ifndef SLANG_LINK_H
#define SLANG_LINK_H 1
-#include "slang_compile.h"
+#include "main/mtypes.h"
extern void
diff --git a/src/mesa/slang/slang_log.h b/src/mesa/slang/slang_log.h
index dcaba0285a..544a26654e 100644
--- a/src/mesa/slang/slang_log.h
+++ b/src/mesa/slang/slang_log.h
@@ -27,6 +27,8 @@
#define SLANG_LOG_H
+#include "main/glheader.h"
+
typedef struct slang_info_log_
{
char *text;
diff --git a/src/mesa/slang/slang_mem.h b/src/mesa/slang/slang_mem.h
index b5bfae2479..0f06df3c0c 100644
--- a/src/mesa/slang/slang_mem.h
+++ b/src/mesa/slang/slang_mem.h
@@ -27,7 +27,7 @@
#define SLANG_MEM_H
-#include "main/imports.h"
+#include "main/glheader.h"
typedef struct slang_mempool_ slang_mempool;
diff --git a/src/mesa/slang/slang_print.h b/src/mesa/slang/slang_print.h
index 46605c8061..99da304143 100644
--- a/src/mesa/slang/slang_print.h
+++ b/src/mesa/slang/slang_print.h
@@ -3,6 +3,12 @@
#ifndef SLANG_PRINT
#define SLANG_PRINT
+#include "main/glheader.h"
+#include "slang_compile_function.h"
+#include "slang_compile_operation.h"
+#include "slang_compile_variable.h"
+#include "slang_typeinfo.h"
+
extern void
slang_print_function(const slang_function *f, GLboolean body);
diff --git a/src/mesa/slang/slang_simplify.h b/src/mesa/slang/slang_simplify.h
index 8689c23b1a..37fb938d4f 100644
--- a/src/mesa/slang/slang_simplify.h
+++ b/src/mesa/slang/slang_simplify.h
@@ -26,6 +26,13 @@
#define SLANG_SIMPLIFY_H
+#include "main/glheader.h"
+#include "slang_compile.h"
+#include "slang_compile_function.h"
+#include "slang_compile_operation.h"
+#include "slang_log.h"
+#include "slang_utility.h"
+
extern GLint
_slang_lookup_constant(const char *name);
diff --git a/src/mesa/slang/slang_storage.h b/src/mesa/slang/slang_storage.h
index 1876a36dd6..de1f1841a3 100644
--- a/src/mesa/slang/slang_storage.h
+++ b/src/mesa/slang/slang_storage.h
@@ -25,7 +25,12 @@
#ifndef SLANG_STORAGE_H
#define SLANG_STORAGE_H
-#include "slang_compile.h"
+#include "main/glheader.h"
+#include "slang_compile_function.h"
+#include "slang_compile_struct.h"
+#include "slang_compile_variable.h"
+#include "slang_typeinfo.h"
+#include "slang_utility.h"
/*
diff --git a/src/mesa/slang/slang_typeinfo.h b/src/mesa/slang/slang_typeinfo.h
index 2251b06325..5ddfe9612c 100644
--- a/src/mesa/slang/slang_typeinfo.h
+++ b/src/mesa/slang/slang_typeinfo.h
@@ -25,11 +25,9 @@
#ifndef SLANG_TYPEINFO_H
#define SLANG_TYPEINFO_H 1
-#include "main/imports.h"
-#include "main/mtypes.h"
+#include "main/glheader.h"
#include "slang_log.h"
#include "slang_utility.h"
-#include "slang_vartable.h"
struct slang_operation_;
diff --git a/src/mesa/slang/slang_utility.h b/src/mesa/slang/slang_utility.h
index 2c0d0bcbb2..cb9b6d2aaa 100644
--- a/src/mesa/slang/slang_utility.h
+++ b/src/mesa/slang/slang_utility.h
@@ -26,6 +26,8 @@
#define SLANG_UTILITY_H
+#include "main/glheader.h"
+
/* Compile-time assertions. If the expression is zero, try to declare an
* array of size [-1] to cause compilation error.
*/
diff --git a/src/mesa/slang/slang_vartable.h b/src/mesa/slang/slang_vartable.h
index 94bcd63f45..97945b89d0 100644
--- a/src/mesa/slang/slang_vartable.h
+++ b/src/mesa/slang/slang_vartable.h
@@ -2,6 +2,9 @@
#ifndef SLANG_VARTABLE_H
#define SLANG_VARTABLE_H
+#include "main/glheader.h"
+#include "slang_utility.h"
+
struct slang_ir_storage_;
typedef struct slang_var_table_ slang_var_table;