diff options
author | Brian Paul <[email protected]> | 2008-11-21 14:24:28 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-11-21 14:24:28 -0700 |
commit | b63a31b36f2e1a198c214f41e0518991b1a8fa49 (patch) | |
tree | 237f9b083ebafa6ea1cc2a02b76a042a3c914401 /src | |
parent | c45c5c4ca42c29ab73e89449a41a843c24fbe159 (diff) |
mesa: better variable name: s/aux/store/
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 14 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_compile_variable.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_compile_variable.h | 5 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_vartable.c | 4 |
5 files changed, 15 insertions, 12 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 851335d9c58..882a6534e57 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -238,9 +238,9 @@ _slang_attach_storage(slang_ir_node *n, slang_variable *var) if (!n->Store) { /* need to setup storage */ - if (n->Var && n->Var->aux) { + if (n->Var && n->Var->store) { /* node storage info = var storage info */ - n->Store = (slang_ir_storage *) n->Var->aux; + n->Store = n->Var->store; } else { /* alloc new storage info */ @@ -251,8 +251,8 @@ _slang_attach_storage(slang_ir_node *n, slang_variable *var) (void*) n->Store, n->Store->Size); #endif if (n->Var) - n->Var->aux = n->Store; - assert(n->Var->aux); + n->Var->store = n->Store; + assert(n->Var->store); } } } @@ -2430,8 +2430,8 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) n = new_node0(IR_VAR_DECL); if (n) { _slang_attach_storage(n, var); - assert(var->aux); - assert(n->Store == var->aux); + assert(var->store); + assert(n->Store == var->store); assert(n->Store); assert(n->Store->Index < 0); @@ -3890,7 +3890,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, store ? store->Index : -2); if (store) - var->aux = store; /* save var's storage info */ + var->store = store; /* save var's storage info */ var->declared = GL_TRUE; diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index 3428b49e166..37fb2eedb1f 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -266,7 +266,7 @@ slang_variable_construct(slang_variable * var) var->address = ~0; var->size = 0; var->isTemp = GL_FALSE; - var->aux = NULL; + var->store = NULL; var->declared = 0; return 1; } diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h index c6db16fcfa9..8e30728ab89 100644 --- a/src/mesa/shader/slang/slang_compile_variable.h +++ b/src/mesa/shader/slang/slang_compile_variable.h @@ -30,6 +30,9 @@ extern "C" { #endif +struct slang_ir_storage_; + + typedef enum slang_type_variant_ { SLANG_VARIANT, /* the default */ @@ -107,7 +110,7 @@ typedef struct slang_variable_ GLuint size; /**< Variable's size in bytes */ GLboolean isTemp; /**< a named temporary (__resultTmp) */ GLboolean declared; /**< for debug */ - void *aux; /**< Used during code gen */ + struct slang_ir_storage_ *store; /**< Storage for this var */ } slang_variable; diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 0a3ab39eb10..f31e9b4e6c7 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -2025,7 +2025,7 @@ emit_var_decl(slang_emit_info *emitInfo, slang_ir_node *n) printf("IR_VAR_DECL %s %d store %p\n", (char*) n->Var->a_name, n->Store->Index, (void*) n->Store); */ - assert(n->Var->aux == n->Store); + assert(n->Var->store == n->Store); } if (emitInfo->EmitComments) { /* emit NOP with comment describing the variable's storage location */ diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c index 95971a70a93..de0c93957b4 100644 --- a/src/mesa/shader/slang/slang_vartable.c +++ b/src/mesa/shader/slang/slang_vartable.c @@ -107,7 +107,7 @@ _slang_pop_var_table(slang_var_table *vt) /* free the storage allocated for each variable */ for (i = 0; i < t->NumVars; i++) { - slang_ir_storage *store = (slang_ir_storage *) t->Vars[i]->aux; + slang_ir_storage *store = t->Vars[i]->store; GLint j; GLuint comp; if (dbg) printf(" Free var %s, size %d at %d.%s\n", @@ -165,7 +165,7 @@ _slang_add_variable(slang_var_table *vt, slang_variable *v) assert(vt); t = vt->Top; assert(t); - if (dbg) printf("Adding var %s, store %p\n", (char *) v->a_name, v->aux); + if (dbg) printf("Adding var %s, store %p\n", (char *) v->a_name, (void *) v->store); t->Vars = (slang_variable **) _slang_realloc(t->Vars, t->NumVars * sizeof(slang_variable *), |