aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-21 09:17:03 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-21 10:38:31 -0700
commit91a5b2657d3dfd56a3d1f36dc2e165999fbde2fe (patch)
treeef7549382ad5222f4e8a018e2f3eac37b03db054
parent6189274f5751ed3595e42f044f4f8ce386f5a272 (diff)
pan/midgard: Reorder bits check to fix 8-bit masks
Coverity. Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r--src/panfrost/midgard/disassemble.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/panfrost/midgard/disassemble.c b/src/panfrost/midgard/disassemble.c
index be8c66fe2cc..9174bef33a8 100644
--- a/src/panfrost/midgard/disassemble.c
+++ b/src/panfrost/midgard/disassemble.c
@@ -411,6 +411,11 @@ print_mask_vec16(uint8_t mask, midgard_dest_override override)
static void
print_mask(uint8_t mask, unsigned bits, midgard_dest_override override)
{
+ if (bits == 8) {
+ print_mask_vec16(mask, override);
+ return;
+ }
+
if (bits < 16) {
/* Shouldn't happen but with junk / out-of-spec shaders it
* would cause an infinite loop */
@@ -419,11 +424,6 @@ print_mask(uint8_t mask, unsigned bits, midgard_dest_override override)
return;
}
- if (bits == 8) {
- print_mask_vec16(mask, override);
- return;
- }
-
/* Skip 'complete' masks */
if (bits >= 32 && mask == 0xFF) return;