mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
mesa: array size fix in _slang_typeof_operation()
(cherry picked from commit 87a00959ba)
This commit is contained in:
parent
47331842d4
commit
a2ca0c0430
1 changed files with 9 additions and 1 deletions
|
|
@ -600,7 +600,15 @@ _slang_typeof_operation(slang_operation * op,
|
|||
return GL_FALSE;
|
||||
}
|
||||
ti->can_be_referenced = GL_TRUE;
|
||||
ti->array_len = var->array_len;
|
||||
if (var->type.specifier.type == SLANG_SPEC_ARRAY &&
|
||||
var->type.array_len >= 1) {
|
||||
/* the datatype is an array, ex: float[3] x; */
|
||||
ti->array_len = var->type.array_len;
|
||||
}
|
||||
else {
|
||||
/* the variable is an array, ex: float x[3]; */
|
||||
ti->array_len = var->array_len;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SLANG_OPER_SEQUENCE:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue