summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-03-10 17:23:36 -0600
committerBrian Paul <[email protected]>2009-03-10 18:25:38 -0600
commitb78463cbad0b1f4191b3b235b70625651eeefb05 (patch)
tree0a49b8934085f69d85e46744abc32ade23425877 /src/mesa/shader
parent0522624c834fc6d4a8803cc469af9dc6f3d4ee14 (diff)
glsl: some clean-ups, remove old assertions, add new assertions
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 8663054a9de..80bbf2a5e5b 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -315,10 +315,10 @@ _slang_attach_storage(slang_ir_node *n, slang_variable *var)
n->Var = var;
if (!n->Store) {
- /* need to setup storage */
- if (n->Var && n->Var->store) {
- /* node storage info = var storage info */
- n->Store = n->Var->store;
+ /* need to setup node's storage */
+ if (var->store) {
+ /* node's storage = var's storage */
+ n->Store = var->store;
}
else {
/* alloc new storage info */
@@ -328,9 +328,7 @@ _slang_attach_storage(slang_ir_node *n, slang_variable *var)
(char*) var->a_name,
(void*) n->Store, n->Store->Size);
#endif
- if (n->Var)
- n->Var->store = n->Store;
- assert(n->Var->store);
+ var->store = n->Store;
}
}
}
@@ -745,6 +743,7 @@ new_var(slang_assemble_ctx *A, slang_variable *var)
{
slang_ir_node *n = new_node0(IR_VAR);
if (n) {
+ ASSERT(var->store);
_slang_attach_storage(n, var);
}
return n;