summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-12-12 10:17:58 -0700
committerBrian Paul <brianp@vmware.com>2009-01-06 09:09:20 -0700
commit9fc529bcff1de621de3f9cb6bf7e2b4f00b26d3a (patch)
tree43e2030712b5b8edb965241aa92f858f51b3f016 /src
parenta5cd8fef91edf1d23888d0dc074ace91ef3f147a (diff)
mesa: more glsl type/function movement
(cherry picked from commit 9a174ef4090189e19831092bb2bae4bfc5396968)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_compile.h7
-rw-r--r--src/mesa/shader/slang/slang_compile_function.h2
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.h8
-rw-r--r--src/mesa/shader/slang/slang_typeinfo.c4
-rw-r--r--src/mesa/shader/slang/slang_typeinfo.h23
5 files changed, 14 insertions, 30 deletions
diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h
index 35e468b44e..d0f0bfc8fb 100644
--- a/src/mesa/shader/slang/slang_compile.h
+++ b/src/mesa/shader/slang/slang_compile.h
@@ -37,6 +37,13 @@
extern "C" {
#endif
+typedef struct slang_name_space_
+{
+ struct slang_function_scope_ *funcs;
+ struct slang_struct_scope_ *structs;
+ struct slang_variable_scope_ *vars;
+} slang_name_space;
+
typedef enum slang_unit_type_
{
SLANG_UNIT_FRAGMENT_SHADER,
diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h
index 85e69432ac..5a432d4667 100644
--- a/src/mesa/shader/slang/slang_compile_function.h
+++ b/src/mesa/shader/slang/slang_compile_function.h
@@ -84,7 +84,7 @@ extern struct slang_function_ *
_slang_locate_function(const struct slang_function_scope_ *funcs,
slang_atom name, struct slang_operation_ *params,
GLuint num_params,
- const slang_name_space *space,
+ const struct slang_name_space_ *space,
slang_atom_pool *atoms, slang_info_log *log,
GLboolean *error);
diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h
index 554684b75f..4366391995 100644
--- a/src/mesa/shader/slang/slang_compile_variable.h
+++ b/src/mesa/shader/slang/slang_compile_variable.h
@@ -25,10 +25,6 @@
#ifndef SLANG_COMPILE_VARIABLE_H
#define SLANG_COMPILE_VARIABLE_H
-#if defined __cplusplus
-extern "C" {
-#endif
-
struct slang_ir_storage_;
@@ -91,8 +87,4 @@ _slang_locate_variable(const slang_variable_scope *, const slang_atom a_name,
GLboolean all);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* SLANG_COMPILE_VARIABLE_H */
diff --git a/src/mesa/shader/slang/slang_typeinfo.c b/src/mesa/shader/slang/slang_typeinfo.c
index a0357d7cef..4ccd9465da 100644
--- a/src/mesa/shader/slang/slang_typeinfo.c
+++ b/src/mesa/shader/slang/slang_typeinfo.c
@@ -130,7 +130,7 @@ _slang_is_swizzle(const char *field, GLuint rows, slang_swizzle * swz)
* do not have duplicated fields. Returns GL_TRUE if this is a
* swizzle mask. Returns GL_FALSE otherwise
*/
-GLboolean
+static GLboolean
_slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows)
{
GLuint i, c = 0;
@@ -154,7 +154,7 @@ _slang_is_swizzle_mask(const slang_swizzle * swz, GLuint rows)
* Combines (multiplies) two swizzles to form single swizzle.
* Example: "vec.wzyx.yx" --> "vec.zw".
*/
-GLvoid
+static void
_slang_multiply_swizzles(slang_swizzle * dst, const slang_swizzle * left,
const slang_swizzle * right)
{
diff --git a/src/mesa/shader/slang/slang_typeinfo.h b/src/mesa/shader/slang/slang_typeinfo.h
index 171a899f64..3837159261 100644
--- a/src/mesa/shader/slang/slang_typeinfo.h
+++ b/src/mesa/shader/slang/slang_typeinfo.h
@@ -34,6 +34,9 @@
struct slang_operation_;
+struct slang_name_space_;
+
+
/**
* Holds complete information about vector swizzle - the <swizzle>
@@ -47,27 +50,9 @@ typedef struct slang_swizzle_
GLuint swizzle[4];
} slang_swizzle;
-typedef struct slang_name_space_
-{
- struct slang_function_scope_ *funcs;
- struct slang_struct_scope_ *structs;
- struct slang_variable_scope_ *vars;
-} slang_name_space;
-
-
-struct slang_assemble_ctx_;
-
-
extern GLboolean
_slang_is_swizzle(const char *field, GLuint rows, slang_swizzle *swz);
-extern GLboolean
-_slang_is_swizzle_mask(const slang_swizzle *swz, GLuint rows);
-
-extern GLvoid
-_slang_multiply_swizzles(slang_swizzle *, const slang_swizzle *,
- const slang_swizzle *);
-
typedef enum slang_type_variant_
{
@@ -229,7 +214,7 @@ slang_typeinfo_destruct(slang_typeinfo *);
extern GLboolean
_slang_typeof_operation_(struct slang_operation_ *,
- const slang_name_space *,
+ const struct slang_name_space_ *,
slang_typeinfo *, slang_atom_pool *,
slang_info_log *log);