diff options
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index e58256c9f1b..1142bc6416b 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -617,7 +617,8 @@ emit(slang_var_table *vt, slang_ir_node *n, struct gl_program *prog) assert(n->Store); assert(n->Store->File != PROGRAM_UNDEFINED); assert(n->Store->Size > 0); - if (n->Var->isTemp) + assert(n->Store->Index < 0); + if (!n->Var || n->Var->isTemp) n->Store->Index = _slang_alloc_temp(vt, n->Store->Size); else n->Store->Index = _slang_alloc_var(vt, n->Store->Size); |