diff options
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 41646af387a..f180fb949ab 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1486,6 +1486,10 @@ emit_struct_field(slang_emit_info *emitInfo, slang_ir_node *n) { if (n->Store->File == PROGRAM_STATE_VAR) { n->Store->Index = _slang_alloc_statevar(n, emitInfo->prog->Parameters); + if (n->Store->Index < 0) { + slang_info_log_error(emitInfo->log, "Error parsing state variable"); + return NULL; + } } else { GLint offset = n->FieldOffset / 4; |