xserver: Branch 'master'
Eric Anholt
anholt at kemper.freedesktop.org
Thu Jan 21 17:51:26 PST 2016
glamor/glamor_render.c | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 510c8605641803f1f5b5d2de6d3bb422b148e0e7
Author: Eric Anholt <eric at anholt.net>
Date: Thu Jan 21 11:30:15 2016 -0800
glamor: Fix copy-like Render operations between 15 and 16 depth.
Reading and writing to 16-depth pixmaps using PICT_x1r5g5b5 ends up
failing, unless you're doing a straight copy at the same bpp where the
misinterpretation matches on both sides.
Fixes rendercheck/blend/over and renderhceck/blend/src in piglit.
Please cherry-pick this to active stable branches.
Signed-off-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Dave Airlie <airlied at redhat.com>
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index d8574ec..92b6b0c 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -512,6 +512,14 @@ static int
compatible_formats(CARD8 op, PicturePtr dst, PicturePtr src)
{
if (op == PictOpSrc) {
+ /* We can't do direct copies between different depths at 16bpp
+ * because r,g,b are allocated to different bits.
+ */
+ if (dst->pDrawable->bitsPerPixel == 16 &&
+ dst->pDrawable->depth != src->pDrawable->depth) {
+ return 0;
+ }
+
if (src->format == dst->format)
return 1;
More information about the xorg-commit
mailing list