summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk@armlinux.org.uk>2016-11-22 18:02:52 +0000
committerRussell King <rmk@armlinux.org.uk>2016-11-22 22:01:22 +0000
commit3ec85c46f71fb9c14193eb4b7164d83e4633a02a (patch)
treee382a5fd00bc252e5015f38c96f39ea7bc71fddd
parentac0ee0fe3bc6176623dd778bbfe2157107b04cb3 (diff)
etnaviv: ensure the mask format is a valid source format
Ensure that the mask format used for the IN operation is supported by the GPU. We need to fallback for unsupported formats. Signed-off-by: Russell King <rmk@armlinux.org.uk>
-rw-r--r--etnaviv/etnaviv_render.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/etnaviv/etnaviv_render.c b/etnaviv/etnaviv_render.c
index ffefc12..2093129 100644
--- a/etnaviv/etnaviv_render.c
+++ b/etnaviv/etnaviv_render.c
@@ -682,6 +682,9 @@ static int etnaviv_accel_composite_masked(PicturePtr pSrc, PicturePtr pMask,
etnaviv_set_format(vMask, pMask);
+ if (!etnaviv_src_format_valid(etnaviv, vMask->pict_format))
+ goto fallback;
+
/*
* Get the source. The source image will be described by vSrc with
* origin src_topleft. This will always be the temporary image,