[PATCH 4/7] etnaviv: apply non-alpha workaround to mask
Lucas Stach
l.stach at pengutronix.de
Tue Nov 22 11:44:17 UTC 2016
This fixes a lot of rendercheck errors with non-alpha masks.
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
etnaviv/etnaviv_render.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/etnaviv/etnaviv_render.c b/etnaviv/etnaviv_render.c
index d547aefe5c1e..d9feeee55c61 100644
--- a/etnaviv/etnaviv_render.c
+++ b/etnaviv/etnaviv_render.c
@@ -688,6 +688,11 @@ static int etnaviv_accel_composite_masked(PicturePtr pSrc, PicturePtr pMask,
dump_vPix(etnaviv, vMask, 1, "A-MASK%2.2x-%p", op, pMask);
#endif
+ if (etnaviv_workaround_nonalpha(vMask)) {
+ mask_op.alpha_mode |= VIVS_DE_ALPHA_MODES_GLOBAL_SRC_ALPHA_MODE_GLOBAL;
+ mask_op.src_alpha = 255;
+ }
+
/*
* Blend the source (in the temporary pixmap) with the mask
* via a InReverse op.
--
2.10.2
More information about the etnaviv
mailing list