mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 23:40:33 +01:00
mesa: glsl: added initializer size/type error checking
This commit is contained in:
parent
7c59a2b5a2
commit
e68a3ef1ef
1 changed files with 5 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue