summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2014-08-02 15:46:22 +0100
committerRussell King <rmk@arm.linux.org.uk>2014-08-02 16:12:19 +0100
commit00dff49e13c46517e005611a18f9a846528640d5 (patch)
tree61f32d9d07b3a63e8153136d8242f8d849edb74b
parent0d6aa9b5a48e15d02c8f36a041aba7481f9f2cbe (diff)
downloadxf86-video-armada-00dff49e13c46517e005611a18f9a846528640d5.tar.gz
vivante: include alpha channel in pixmaps
Always include the alpha channel in pixmap operations. This required as the blit can be used to upload images to the pixmaps which back a Xrender picture, where the alpha channel must be preserved, and because the 2D PE2.0 engine will avoid copying those bits. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r--src/vivante.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vivante.c b/src/vivante.c
index ff42a79..609730b 100644
--- a/src/vivante.c
+++ b/src/vivante.c
@@ -86,18 +86,19 @@ void vivante_set_pixmap_bo(PixmapPtr pixmap, struct drm_armada_bo *bo)
/*
* This is an imprecise conversion to the Vivante GAL format.
- * One important thing here is that Pixmaps don't have an
- * alpha channel.
+ * Although pixmaps in X generally don't have an alpha channel,
+ * we must set the format to include the alpha channel to
+ * ensure that the GPU copies all the bits.
*/
switch (pixmap->drawable.bitsPerPixel) {
case 16:
if (pixmap->drawable.depth == 15)
- format = gcvSURF_X1R5G5B5;
+ format = gcvSURF_A1R5G5B5;
else
format = gcvSURF_R5G6B5;
break;
case 32:
- format = gcvSURF_X8R8G8B8;
+ format = gcvSURF_A8R8G8B8;
break;
default:
goto fail;