summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-02-02 15:17:46 -0700
committerBrian <brian@yutani.localnet.net>2007-02-02 15:17:46 -0700
commit4f22bdf3e561ac9df46f0cf1e19d9f69f419f5e3 (patch)
tree03f0623b64522e66d8efc6aa86e80fa3bbe408eb
parent640afdf4f26746270ae45ec17711457ee643ae91 (diff)
remove more slang assembly-related code
-rw-r--r--src/mesa/shader/slang/slang_assemble_typeinfo.c2
-rw-r--r--src/mesa/shader/slang/slang_assemble_typeinfo.h70
-rw-r--r--src/mesa/shader/slang/slang_codegen.c2
-rw-r--r--src/mesa/shader/slang/slang_compile.h2
-rw-r--r--src/mesa/shader/slang/slang_storage.h2
5 files changed, 65 insertions, 13 deletions
diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.c b/src/mesa/shader/slang/slang_assemble_typeinfo.c
index 6a87ef3340..eafc452972 100644
--- a/src/mesa/shader/slang/slang_assemble_typeinfo.c
+++ b/src/mesa/shader/slang/slang_assemble_typeinfo.c
@@ -29,7 +29,7 @@
*/
#include "imports.h"
-#include "slang_assemble.h"
+#include "slang_assemble_typeinfo.h"
#include "slang_compile.h"
#include "slang_error.h"
#include "prog_instruction.h"
diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.h b/src/mesa/shader/slang/slang_assemble_typeinfo.h
index 777dc21f3a..b2ca8b8633 100644
--- a/src/mesa/shader/slang/slang_assemble_typeinfo.h
+++ b/src/mesa/shader/slang/slang_assemble_typeinfo.h
@@ -22,12 +22,68 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if !defined SLANG_ASSEMBLE_TYPEINFO_H
-#define SLANG_ASSEMBLE_TYPEINFO_H
+#ifndef SLANG_ASSEMBLE_TYPEINFO_H
+#define SLANG_ASSEMBLE_TYPEINFO_H 1
-#if defined __cplusplus
-extern "C" {
-#endif
+#include "imports.h"
+#include "mtypes.h"
+#include "slang_utility.h"
+#include "slang_vartable.h"
+
+
+struct slang_operation_;
+
+
+/**
+ * Holds complete information about vector swizzle - the <swizzle>
+ * array contains vector component source indices, where 0 is "x", 1
+ * is "y", 2 is "z" and 3 is "w".
+ * Example: "xwz" --> { 3, { 0, 3, 2, not used } }.
+ */
+typedef struct slang_swizzle_
+{
+ GLuint num_components;
+ GLuint swizzle[4];
+} slang_swizzle;
+
+typedef struct slang_assembly_name_space_
+{
+ struct slang_function_scope_ *funcs;
+ struct slang_struct_scope_ *structs;
+ struct slang_variable_scope_ *vars;
+} slang_assembly_name_space;
+
+
+typedef struct slang_assemble_ctx_
+{
+ slang_atom_pool *atoms;
+ slang_assembly_name_space space;
+ slang_swizzle swz;
+ struct gl_program *program;
+ slang_var_table *vartable;
+
+ struct slang_function_ *CurFunction;
+ slang_atom CurLoopBreak;
+ slang_atom CurLoopCont;
+} slang_assemble_ctx;
+
+extern struct slang_function_ *
+_slang_locate_function(const struct slang_function_scope_ *funcs,
+ slang_atom name, const struct slang_operation_ *params,
+ GLuint num_params,
+ const slang_assembly_name_space *space,
+ slang_atom_pool *);
+
+
+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 *);
/**
@@ -144,9 +200,5 @@ _slang_type_dim(slang_type_specifier_type);
-#ifdef __cplusplus
-}
-#endif
-
#endif
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 03562018ca..d39cdd22a5 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -30,7 +30,7 @@
#include "imports.h"
#include "macros.h"
-#include "slang_assemble.h"
+#include "slang_assemble_typeinfo.h"
#include "slang_codegen.h"
#include "slang_compile.h"
#include "slang_storage.h"
diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h
index f2731cb574..0fe5443c7c 100644
--- a/src/mesa/shader/slang/slang_compile.h
+++ b/src/mesa/shader/slang/slang_compile.h
@@ -27,7 +27,7 @@
#include "imports.h"
#include "mtypes.h"
-#include "slang_assemble.h"
+#include "slang_assemble_typeinfo.h"
#include "slang_compile_variable.h"
#include "slang_compile_struct.h"
#include "slang_compile_operation.h"
diff --git a/src/mesa/shader/slang/slang_storage.h b/src/mesa/shader/slang/slang_storage.h
index b433e8bcec..642ffa38c4 100644
--- a/src/mesa/shader/slang/slang_storage.h
+++ b/src/mesa/shader/slang/slang_storage.h
@@ -26,7 +26,7 @@
#define SLANG_STORAGE_H
#include "slang_compile.h"
-#include "slang_assemble.h"
+#include "slang_assemble_typeinfo.h"
#if defined __cplusplus
extern "C" {