panfrost: fix shift overflow in bi_fold_constant
closes https://gitlab.freedesktop.org/mesa/mesa/-/issues/9517 Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26116>
This commit is contained in:

committed by
Marge Bot

parent
b703e0be53
commit
e6156df53a
@@ -72,7 +72,7 @@ bi_fold_constant(bi_instr *I, bool *unsupported)
|
||||
if (I->not_result || I->src[0].neg || I->src[1].neg)
|
||||
break;
|
||||
|
||||
return (a << c) | b;
|
||||
return (a << (c & 0x1F)) | b;
|
||||
|
||||
case BI_OPCODE_F32_TO_U32:
|
||||
if (I->round == BI_ROUND_NONE) {
|
||||
|
Reference in New Issue
Block a user