summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-11-21 14:24:28 -0700
committerBrian Paul <[email protected]>2009-01-06 08:51:00 -0700
commitdb2cde413c9d2843a6108db5e5f9b2f112a11fcf (patch)
tree8309a490f1f1b1617e93a370d1e9cd3641eef7ce
parent515a43da163d4662591969cd0be7601ac98bc75b (diff)
mesa: better variable name: s/aux/store/
(cherry picked from commit b63a31b36f2e1a198c214f41e0518991b1a8fa49)
-rw-r--r--src/mesa/shader/slang/slang_codegen.c14
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.c2
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.h5
-rw-r--r--src/mesa/shader/slang/slang_emit.c2
-rw-r--r--src/mesa/shader/slang/slang_vartable.c4
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 c0bb008243b..10faaeabc5c 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);
}
}
}
@@ -2427,8 +2427,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);
@@ -3887,7 +3887,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 62cdd006911..9266070844a 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -2022,7 +2022,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 *),