From 9e78f17b74a862e34891901cde8292f91adeb655 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 22 Mar 2020 03:48:05 +0100 Subject: [PATCH] etnaviv: Emit PE.ALPHA_COLOR_EXT* on GPUs with half-float support At least GC880 (iMX6S), GC2000 (iMX6Q) blobs do not emit the PE.ALPHA_COLOR_EXT0 and PE.ALPHA_COLOR_EXT1 into the command stream. The GCnano (STM32MP1) is not affected by this change either. This is because neither of these GPUs support the half-float feature. Emit PE.ALPHA_COLOR_EXT* in etnaviv only if half-float support is present in the GPU. This fixes all of the currently failing dEQPs in this group: dEQP-GLES2.functional.fragment_ops.blend.* Fixes: 76adf041f25 ("etnaviv: fix blend color on newer GPUs") Signed-off-by: Marek Vasut Reviewed-by: Christian Gmeiner Reviewed-by: Jonathan Marek Tested-by: Marge Bot Part-of: --- src/gallium/drivers/etnaviv/etnaviv_emit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c index 741dd4abddf..c626254373a 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_emit.c +++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c @@ -537,7 +537,8 @@ etna_emit_state(struct etna_context *ctx) /*014A8*/ EMIT_STATE(PE_DITHER(x), blend->PE_DITHER[x]); } } - if (unlikely(dirty & (ETNA_DIRTY_BLEND_COLOR))) { + if (unlikely(dirty & (ETNA_DIRTY_BLEND_COLOR)) && + VIV_FEATURE(screen, chipMinorFeatures1, HALF_FLOAT)) { /*014B0*/ EMIT_STATE(PE_ALPHA_COLOR_EXT0, ctx->blend_color.PE_ALPHA_COLOR_EXT0); /*014B4*/ EMIT_STATE(PE_ALPHA_COLOR_EXT1, ctx->blend_color.PE_ALPHA_COLOR_EXT1); } -- 2.30.2