From: Alyssa Rosenzweig Date: Wed, 21 Aug 2019 16:17:03 +0000 (-0700) Subject: pan/midgard: Reorder bits check to fix 8-bit masks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91a5b2657d3dfd56a3d1f36dc2e165999fbde2fe;p=mesa.git pan/midgard: Reorder bits check to fix 8-bit masks Coverity. Signed-off-by: Alyssa Rosenzweig --- 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;