summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_codegen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_codegen.c')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index ad9cf06e275..92c96bef9ee 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -2687,11 +2687,12 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper)
if (!rhs)
return NULL;
- assert(rhs);
+ if (!rhs->Store || var->Store->Size != rhs->Store->Size) {
+ slang_info_log_error(A->log, "invalid assignment (wrong types)");
+ return NULL;
+ }
+
init = new_node2(IR_MOVE, var, rhs);
- /*
- assert(rhs->Opcode != IR_SEQ);
- */
n = new_seq(varDecl, init);
}
else {