panfrost: Clarify intention with PIPE_SWIZZLE_X check
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 21 Aug 2019 16:22:17 +0000 (09:22 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 21 Aug 2019 17:38:31 +0000 (10:38 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_mfbd.c

index bae3429afae7480f98198c9c5a571e1d33579518..f8942b51de4e983ff04b808ec2b2c03684ff2222 100644 (file)
@@ -42,7 +42,8 @@ panfrost_invert_swizzle(const unsigned char *in, unsigned char *out)
                 unsigned char i = in[c];
 
                 /* Who cares? */
-                if (i < PIPE_SWIZZLE_X || i > PIPE_SWIZZLE_W)
+                assert(PIPE_SWIZZLE_X == 0);
+                if (i > PIPE_SWIZZLE_W)
                         continue;
 
                 /* Invert */