panfrost: Simplify blend_factor_constant_mask

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12152>
This commit is contained in:
Alyssa Rosenzweig 2021-07-30 18:19:46 -04:00 committed by Marge Bot
parent 01a1b253b4
commit 95187c03f1

View file

@ -72,14 +72,12 @@ can_fixed_function_equation(enum blend_func blend_func,
static unsigned
blend_factor_constant_mask(enum blend_factor factor)
{
unsigned mask = 0;
if (factor == BLEND_FACTOR_CONSTANT_COLOR)
mask |= 0b0111; /* RGB */
return 0b0111; /* RGB */
else if (factor == BLEND_FACTOR_CONSTANT_ALPHA)
mask |= 0b1000; /* A */
return mask;
return 0b1000; /* A */
else
return 0b0000; /* - */
}
unsigned