From e1624b67dc1872fbf7cef09b31279b61bbb7b3a1 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 27 Oct 2020 20:24:46 -0400 Subject: [PATCH] panfrost: Use panfrost_blendable_formats for blending Finally the yak shaving pays off. Signed-off-by: Alyssa Rosenzweig Tested-by: Christian Hewitt Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_blending.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_blending.c b/src/gallium/drivers/panfrost/pan_blending.c index e1b6a7ba7f6..6063ad3b55e 100644 --- a/src/gallium/drivers/panfrost/pan_blending.c +++ b/src/gallium/drivers/panfrost/pan_blending.c @@ -35,22 +35,7 @@ bool panfrost_can_fixed_blend(enum pipe_format format) { - /* Fixed-function can handle sRGB */ - format = util_format_linear(format); - - switch (panfrost_pipe_format_table[format].hw) { - case MALI_RGB565: - case MALI_RGB5_A1_UNORM: - case MALI_RGB10_A2_UNORM: - case MALI_RGBA4_UNORM: - case MALI_R8_UNORM: - case MALI_RG8_UNORM: - case MALI_RGB8_UNORM: - case MALI_RGBA8_UNORM: - return true; - default: - return false; - } + return panfrost_blend_format(format).internal != 0; } /* Helper to find the uncomplemented Gallium blend factor corresponding to a