diff options
author | Michal Krol <[email protected]> | 2005-05-19 11:50:53 +0000 |
---|---|---|
committer | Michal Krol <[email protected]> | 2005-05-19 11:50:53 +0000 |
commit | 02168254a8bc269511093e20411c863979b2afac (patch) | |
tree | 27ea656734a399cbefbb98d99871140a06fe9040 /src/mesa/shader/slang/slang_compile.h | |
parent | e5ff2b94ff16a05d4c5928a85199291e2e7f234e (diff) |
intermediate code generator (not finished);
generic back-end interpreter (interprets directly intermediate code)
Diffstat (limited to 'src/mesa/shader/slang/slang_compile.h')
-rw-r--r-- | src/mesa/shader/slang/slang_compile.h | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index 25a0ef8ad81..a9a075c37f2 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -68,14 +68,21 @@ typedef enum slang_type_specifier_type_ slang_spec_sampler2DShadow, slang_spec_struct, slang_spec_array -} slang_type_specifier_type; +} slang_type_specifier_type;
+
+slang_type_specifier_type slang_type_specifier_type_from_string (const char *); typedef struct slang_type_specifier_ { slang_type_specifier_type type; struct slang_struct_ *_struct; /* spec_struct */ struct slang_type_specifier_ *_array; /* spec_array */ -} slang_type_specifier; +} slang_type_specifier;
+
+void slang_type_specifier_construct (slang_type_specifier *);
+void slang_type_specifier_destruct (slang_type_specifier *);
+int slang_type_specifier_copy (slang_type_specifier *, const slang_type_specifier *);
+int slang_type_specifier_equal (const slang_type_specifier *, const slang_type_specifier *); typedef struct slang_fully_specified_type_ { @@ -164,29 +171,40 @@ typedef struct slang_operation_ float literal; /* bool, literal_int, literal_float */ char *identifier; /* asm, identifier, call, field */ slang_variable_scope *locals; -} slang_operation; +} slang_operation;
+
+int slang_operation_construct_a (slang_operation *);
+void slang_operation_destruct (slang_operation *); typedef struct slang_variable_ { slang_fully_specified_type type; char *name; slang_operation *array_size; /* spec_array */ - slang_operation *initializer; -} slang_variable; + slang_operation *initializer;
+ unsigned int address; +} slang_variable;
+
+slang_variable *_slang_locate_variable (slang_variable_scope *scope, const char *name, int all); typedef struct slang_struct_scope_ { struct slang_struct_ *structs; unsigned int num_structs; struct slang_struct_scope_ *outer_scope; -} slang_struct_scope; +} slang_struct_scope;
+
+struct slang_struct_ *slang_struct_scope_find (slang_struct_scope *, const char *, int); typedef struct slang_struct_ { char *name; slang_variable_scope *fields; slang_struct_scope *structs; -} slang_struct; +} slang_struct;
+
+int slang_struct_construct_a (slang_struct *);
+int slang_struct_copy (slang_struct *, const slang_struct *); typedef enum slang_function_kind_ { @@ -201,7 +219,8 @@ typedef struct slang_function_ slang_variable header; slang_variable_scope *parameters; unsigned int param_count; - slang_operation *body; + slang_operation *body;
+ unsigned int address; } slang_function; typedef struct slang_function_scope_ |