From 5bdc9096b7c2aa4c5363a5c0a592e6d7ff7b34ed Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 21 Aug 2019 09:22:17 -0700 Subject: [PATCH] panfrost: Clarify intention with PIPE_SWIZZLE_X check Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_mfbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c index bae3429afae..f8942b51de4 100644 --- a/src/gallium/drivers/panfrost/pan_mfbd.c +++ b/src/gallium/drivers/panfrost/pan_mfbd.c @@ -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 */ -- 2.30.2