From 35e17905e1c54558059f6b72b8594a3377f1a57c Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 10 Aug 2014 02:25:14 -0400 Subject: exa/nv10: fix blend function setup to check the correct mask Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs --- src/nv10_exa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nv10_exa.c b/src/nv10_exa.c index 47cf0ef..6b75a9e 100644 --- a/src/nv10_exa.c +++ b/src/nv10_exa.c @@ -461,7 +461,7 @@ setup_render_target(NVPtr pNv, PicturePtr pict, PixmapPtr pixmap) } static void -setup_blend_function(NVPtr pNv, PicturePtr pdpict, int alu) +setup_blend_function(NVPtr pNv, PicturePtr pdpict, PicturePtr pmpict, int alu) { struct nouveau_pushbuf *push = pNv->pushbuf; struct pict_op *op = &nv10_pict_op[alu]; @@ -476,7 +476,7 @@ setup_blend_function(NVPtr pNv, PicturePtr pdpict, int alu) */ src_factor = SF(ZERO); - if (effective_component_alpha(pNv->pmpict)) { + if (effective_component_alpha(pmpict)) { if (dst_factor == DF(SRC_ALPHA)) dst_factor = DF(SRC_COLOR); else if (dst_factor == DF(ONE_MINUS_SRC_ALPHA)) @@ -557,7 +557,7 @@ NV10EXAPrepareComposite(int op, /* setup render target and blending */ if (!setup_render_target(pNv, pict_dst, dst)) return FALSE; - setup_blend_function(pNv, pict_dst, op); + setup_blend_function(pNv, pict_dst, pict_mask, op); /* select picture sources */ if (!setup_picture(pNv, pict_src, src, 0, &sc, &sa)) -- cgit v1.2.3