summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-01-17 18:02:44 -0700
committerBrian <brian@yutani.localnet.net>2007-01-17 18:02:44 -0700
commit4864aaeb02f25942226ce507b6b530b5b883ed63 (patch)
tree5b7a3adde6882ef55d032914dda56842acc549c7 /src/mesa/shader
parentf4e345c1a8e53ff720983849d6b3c945572ff751 (diff)
handle var size > 4 in _slang_pop_var_table()
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/slang/slang_vartable.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c
index d4ec848a0a..f9121f740b 100644
--- a/src/mesa/shader/slang/slang_vartable.c
+++ b/src/mesa/shader/slang/slang_vartable.c
@@ -65,9 +65,13 @@ _slang_pop_var_table(slang_var_table *t)
/* free the storage allocated for each variable */
for (i = 0; i < t->num_entries; i++) {
slang_ir_storage *store = (slang_ir_storage *) t->vars[i]->aux;
- if (dbg) printf(" Free var %s\n", (char*) t->vars[i]->a_name);
- assert(t->temps[store->Index] == VAR);
- t->temps[store->Index] = FREE;
+ GLint j, sz4 = (store->Size + 3) / 4;
+ if (dbg) printf(" Free var %s, size %d\n",
+ (char*) t->vars[i]->a_name, store->Size);
+ for (j = 0; j < sz4; j++) {
+ assert(t->temps[store->Index + j] == VAR);
+ t->temps[store->Index + j] = FREE;
+ }
store->Index = -1;
}
if (t->parent) {