mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-06 13:10:24 +01:00
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@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 510c860564)
This commit is contained in:
parent
6a4f771c5d
commit
71be56c426
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue