summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-09-06 13:37:37 -0700
committerEric Anholt <[email protected]>2018-09-07 08:11:05 -0700
commitf73f748323ef5a421ffd8fa0f02afd9627e31023 (patch)
treecc420dbab30d5d300b8c0a03b51dc65c49ef1a62 /src/gallium/drivers
parent69874e9a6a61d1af92e4d70adaefe1308582c3a1 (diff)
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" <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/v3d/v3dx_emit.c4
1 files changed, 3 insertions, 1 deletions
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");
}