From ba2fb98d3676dce5ee33f5c97d9dbe71a9a82e8c Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 4 Nov 2019 22:21:47 -0500 Subject: pan/midgard: Fix mir_round_bytemask_down for !32b Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/mir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/panfrost/midgard') 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; -- cgit v1.2.3