summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2012-11-06 15:59:41 +0000
committerAndreas Boll <andreas.boll.dev@gmail.com>2013-04-17 13:29:36 +0200
commit108812e18fcb35bf032ba58dee97090e17f7476c (patch)
treec4cc3e4cbccc40fb236d6efa61a433c5af6abf53
parentb2d7d29a88e16a21b7b30b60b29b92b1d0a997fd (diff)
softpipe: Fix rgb_dst_factor == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE.
We must multiply the factor against the destination, not the source. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> (cherry picked from commit 48ce9289001c4c04503bd5061135b120cfe51cee)
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_blend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c
index 5db787ba91..1aac75e54a 100644
--- a/src/gallium/drivers/softpipe/sp_quad_blend.c
+++ b/src/gallium/drivers/softpipe/sp_quad_blend.c
@@ -568,9 +568,9 @@ blend_quad(struct quad_stage *qs,
float diff[4], temp[4];
VEC4_SUB(diff, one, blend_dest[3]);
VEC4_MIN(temp, alpha, diff);
- VEC4_MUL(blend_dest[0], quadColor[0], temp); /* R */
- VEC4_MUL(blend_dest[1], quadColor[1], temp); /* G */
- VEC4_MUL(blend_dest[2], quadColor[2], temp); /* B */
+ VEC4_MUL(blend_dest[0], blend_dest[0], temp); /* R */
+ VEC4_MUL(blend_dest[1], blend_dest[1], temp); /* G */
+ VEC4_MUL(blend_dest[2], blend_dest[2], temp); /* B */
}
break;
case PIPE_BLENDFACTOR_CONST_COLOR: