On 22 January 2016 at 07:06, Eric Anholt <[email protected]> wrote: > Please cherry-pick this to active stable branches. > > 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. > > Signed-off-by: Eric Anholt <[email protected]>
makes sense, Reviewed-by: Dave Airlie <[email protected]> > --- > glamor/glamor_render.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > 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; > > -- > 2.6.4 > > _______________________________________________ > [email protected]: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
