From: Eric Anholt Date: Thu, 6 Sep 2018 20:37:37 +0000 (-0700) Subject: v3d: Fix SRC_ALPHA_SATURATE blending for RTs without alpha. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f73f748323ef5a421ffd8fa0f02afd9627e31023;p=mesa.git v3d: Fix SRC_ALPHA_SATURATE blending for RTs without alpha. Fixes dEQP-GLES3.functional.fragment_ops.blend.default_framebuffer.rgb_func_alpha_func.dst.src_alpha_saturate_src_alpha_saturate and friends with --deqp-egl-config-name=rgb565d0s0 Cc: "18.2" --- diff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c index c58ac4b44a2..537dd1ff9ae 100644 --- a/src/gallium/drivers/v3d/v3dx_emit.c +++ b/src/gallium/drivers/v3d/v3dx_emit.c @@ -69,7 +69,9 @@ v3d_factor(enum pipe_blendfactor factor, bool dst_alpha_one) case PIPE_BLENDFACTOR_INV_CONST_ALPHA: return V3D_BLEND_FACTOR_INV_CONST_ALPHA; case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE: - return V3D_BLEND_FACTOR_SRC_ALPHA_SATURATE; + return (dst_alpha_one ? + V3D_BLEND_FACTOR_ZERO : + V3D_BLEND_FACTOR_SRC_ALPHA_SATURATE); default: unreachable("Bad blend factor"); }