mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
vc4: add assertion on constant_fold
This fixes an issue detected by static analyzer: the right operand of '>>' is a garbage value due to array index out of bounds. Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34050>
This commit is contained in:
parent
54db7c46fa
commit
8f5423820a
1 changed files with 1 additions and 0 deletions
|
|
@ -80,6 +80,7 @@ constant_fold(struct vc4_compile *c, struct qinst *inst)
|
|||
uint32_t result = 0;
|
||||
switch (inst->op) {
|
||||
case QOP_SHR:
|
||||
assert(nsrc == 2);
|
||||
result = ui[0] >> ui[1];
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue