From: Alyssa Rosenzweig Date: Tue, 5 Nov 2019 03:21:47 +0000 (-0500) Subject: pan/midgard: Fix mir_round_bytemask_down for !32b X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba2fb98d3676dce5ee33f5c97d9dbe71a9a82e8c;p=mesa.git pan/midgard: Fix mir_round_bytemask_down for !32b Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/mir.c b/src/panfrost/midgard/mir.c index 609cd5c1db4..7c7149bd547 100644 --- a/src/panfrost/midgard/mir.c +++ b/src/panfrost/midgard/mir.c @@ -376,10 +376,10 @@ mir_round_bytemask_down(uint16_t mask, midgard_reg_mode mode) for (unsigned c = 0; c < channels; ++c) { /* Get bytes in component */ - unsigned submask = (mask >> c * channels) & maxmask; + unsigned submask = (mask >> (c * bytes)) & maxmask; if (submask != maxmask) - mask &= ~(maxmask << (c * channels)); + mask &= ~(maxmask << (c * bytes)); } return mask;