panfrost: Prevent potential integer overflow in instancing
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
diff --git a/src/gallium/drivers/panfrost/pan_instancing.c b/src/gallium/drivers/panfrost/pan_instancing.c
index cd93fa7..3002372 100644
--- a/src/gallium/drivers/panfrost/pan_instancing.c
+++ b/src/gallium/drivers/panfrost/pan_instancing.c
@@ -228,7 +228,7 @@
/* Apply round-down algorithm? e <= 2^shift?. XXX: The blob
* seems to use a different condition */
- if (e <= (1 << shift)) {
+ if (e <= (1ll << shift)) {
magic_divisor = m - 1;
extra_flags = 1;
}