diff options
-rw-r--r-- | etnaviv/etnaviv_render.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/etnaviv/etnaviv_render.c b/etnaviv/etnaviv_render.c index d547aef..a131d1c 100644 --- a/etnaviv/etnaviv_render.c +++ b/etnaviv/etnaviv_render.c @@ -641,6 +641,7 @@ static int etnaviv_accel_composite_masked(PicturePtr pSrc, PicturePtr pMask, } if (pMask->pDrawable) { + xPoint mo; int tx, ty; if (!transform_is_integer_translation(pMask->transform, &tx, &ty)) @@ -656,18 +657,21 @@ static int etnaviv_accel_composite_masked(PicturePtr pSrc, PicturePtr pMask, mask_offset.x += pMask->pDrawable->x; mask_offset.y += pMask->pDrawable->y; + + /* + * Check whether the mask has a etna bo backing it. If not, + * fallback to software for the mask operation. + */ + vMask = etnaviv_drawable_offset(pMask->pDrawable, &mo); + if (!vMask) + goto fallback; + + mask_offset.x += mo.x; + mask_offset.y += mo.y; } else { goto fallback; } - /* - * Check whether the mask has a etna bo backing it. If not, - * fallback to software for the mask operation. - */ - vMask = etnaviv_drawable_offset(pMask->pDrawable, &mask_offset); - if (!vMask) - goto fallback; - etnaviv_set_format(vMask, pMask); /* |