aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-11-04 22:21:47 -0500
committerAlyssa Rosenzweig <[email protected]>2019-11-15 20:08:46 +0000
commitba2fb98d3676dce5ee33f5c97d9dbe71a9a82e8c (patch)
tree90fc36fc516d6591e791b9e64a3a59c041da7169 /src/panfrost/midgard
parent2655a300a369fbc69df5fd53e2adbd45496bf69d (diff)
pan/midgard: Fix mir_round_bytemask_down for !32b
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/mir.c4
1 files changed, 2 insertions, 2 deletions
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;