diff options
author | Michal Krol <[email protected]> | 2006-05-16 09:53:42 +0000 |
---|---|---|
committer | Michal Krol <[email protected]> | 2006-05-16 09:53:42 +0000 |
commit | d1b40400d64a8ab7f4dc64410e165e7c49d30a28 (patch) | |
tree | 26717255ac01da6527ece5776e469e6a60d64145 /src/mesa/shader/slang/slang_compile.h | |
parent | ecf2e5b0a159b880c91859509e80d4ba81f30be6 (diff) |
Cleanup code.
Diffstat (limited to 'src/mesa/shader/slang/slang_compile.h')
-rw-r--r-- | src/mesa/shader/slang/slang_compile.h | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h index a1957bc3cfa..89c3dcfdba2 100644 --- a/src/mesa/shader/slang/slang_compile.h +++ b/src/mesa/shader/slang/slang_compile.h @@ -49,28 +49,38 @@ typedef struct slang_var_pool_ GLuint next_addr; } slang_var_pool; -typedef struct slang_translation_unit_ +typedef struct slang_code_unit_ { - slang_variable_scope globals; - slang_function_scope functions; - slang_struct_scope structs; - slang_unit_type type; - slang_assembly_file *assembly; - int free_assembly; - slang_var_pool *global_pool; - int free_global_pool; - slang_machine *machine; - int free_machine; - slang_atom_pool *atom_pool; - int free_atom_pool; - slang_export_data_table exp_data; - slang_export_code_table exp_code; -} slang_translation_unit; - -int slang_translation_unit_construct (slang_translation_unit *); -int slang_translation_unit_construct2 (slang_translation_unit *, slang_assembly_file *, - slang_var_pool *, slang_machine *, slang_atom_pool *); -void slang_translation_unit_destruct (slang_translation_unit *); + slang_variable_scope vars; + slang_function_scope funs; + slang_struct_scope structs; + slang_unit_type type; + struct slang_code_object_ *object; +} slang_code_unit; + +extern GLvoid +_slang_code_unit_ctr (slang_code_unit *, struct slang_code_object_ *); + +extern GLvoid +_slang_code_unit_dtr (slang_code_unit *); + +typedef struct slang_code_object_ +{ + slang_code_unit builtin[3]; + slang_code_unit unit; + slang_assembly_file assembly; + slang_machine machine; + slang_var_pool varpool; + slang_atom_pool atompool; + slang_export_data_table expdata; + slang_export_code_table expcode; +} slang_code_object; + +extern GLvoid +_slang_code_object_ctr (slang_code_object *); + +extern GLvoid +_slang_code_object_dtr (slang_code_object *); typedef struct slang_info_log_ { @@ -80,11 +90,13 @@ typedef struct slang_info_log_ void slang_info_log_construct (slang_info_log *); void slang_info_log_destruct (slang_info_log *); +int slang_info_log_print (slang_info_log *, const char *, ...); int slang_info_log_error (slang_info_log *, const char *, ...); int slang_info_log_warning (slang_info_log *, const char *, ...); void slang_info_log_memory (slang_info_log *); -int _slang_compile (const char *, slang_translation_unit *, slang_unit_type type, slang_info_log *); +extern GLboolean +_slang_compile (const char *, slang_code_object *, slang_unit_type, slang_info_log *); #ifdef __cplusplus } |