From 19ca2908be5df2240d694c67c6f190982e9f7922 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 12 Dec 2008 09:58:18 -0700 Subject: mesa: remove unused fixup table code in glsl compiler --- src/mesa/shader/slang/slang_compile.c | 4 +-- src/mesa/shader/slang/slang_compile_function.c | 39 -------------------------- src/mesa/shader/slang/slang_compile_function.h | 19 ------------- 3 files changed, 1 insertion(+), 61 deletions(-) diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index ebc98c6c08..d8291b2af4 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2179,10 +2179,8 @@ parse_function(slang_parse_ctx * C, slang_output_ctx * O, int definition, } /* destroy the existing function declaration and replace it - * with the new one, remember to save the fixup table + * with the new one */ - //parsed_func.fixups = found_func->fixups; - //slang_fixup_table_init(&found_func->fixups); slang_function_destruct(found_func); *found_func = parsed_func; } diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c index bc926e6c0e..eca75dcb21 100644 --- a/src/mesa/shader/slang/slang_compile_function.c +++ b/src/mesa/shader/slang/slang_compile_function.c @@ -32,42 +32,6 @@ #include "slang_compile.h" #include "slang_mem.h" -/* slang_fixup_table */ - -void -slang_fixup_table_init(slang_fixup_table * fix) -{ - fix->table = NULL; - fix->count = 0; -} - -void -slang_fixup_table_free(slang_fixup_table * fix) -{ - _slang_free(fix->table); - slang_fixup_table_init(fix); -} - -/** - * Add a new fixup address to the table. - */ -GLboolean -slang_fixup_save(slang_fixup_table *fixups, GLuint address) -{ - fixups->table = (GLuint *) - _slang_realloc(fixups->table, - fixups->count * sizeof(GLuint), - (fixups->count + 1) * sizeof(GLuint)); - if (fixups->table == NULL) - return GL_FALSE; - fixups->table[fixups->count] = address; - fixups->count++; - return GL_TRUE; -} - - - -/* slang_function */ int slang_function_construct(slang_function * func) @@ -86,8 +50,6 @@ slang_function_construct(slang_function * func) _slang_variable_scope_ctr(func->parameters); func->param_count = 0; func->body = NULL; - //func->address = ~0; - //slang_fixup_table_init(&func->fixups); return 1; } @@ -101,7 +63,6 @@ slang_function_destruct(slang_function * func) slang_operation_destruct(func->body); _slang_free(func->body); } - //slang_fixup_table_free(&func->fixups); } diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h index 7fd697ddc8..bd44378b69 100644 --- a/src/mesa/shader/slang/slang_compile_function.h +++ b/src/mesa/shader/slang/slang_compile_function.h @@ -39,21 +39,6 @@ typedef enum slang_function_kind_ } slang_function_kind; -/** - * When we need to fill in addresses which we won't know until the future, - * we keep track of them with a fix-up table. - */ -typedef struct slang_fixup_table_ -{ - GLuint *table; /**< array[count] of addresses */ - GLuint count; -} slang_fixup_table; - -extern void slang_fixup_table_init(slang_fixup_table *); -extern void slang_fixup_table_free(slang_fixup_table *); -extern GLboolean slang_fixup_save(slang_fixup_table *fixups, GLuint address); - - /** * Description of a compiled shader function. */ @@ -64,10 +49,6 @@ typedef struct slang_function_ slang_variable_scope *parameters; /**< formal parameters AND local vars */ unsigned int param_count; /**< number of formal params (no locals) */ slang_operation *body; /**< The instruction tree */ -#if 0 - unsigned int address; /**< Address of this func in memory */ - slang_fixup_table fixups; /**< Mem locations which need func's address */ -#endif } slang_function; extern int slang_function_construct(slang_function *); -- cgit v1.2.3