From d74c9d2ab094879cf9be8b7ffc842f8a0b45a24e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 3 Apr 2020 13:09:07 -0700 Subject: [PATCH] shm: Don't try to put a whole bunch of clipped XY image contents. sw and sh are smaller than w and h, and our temporary pixmap is only sw by sh, and we copy out an area of sw by sh. There's no need to go asking the driver to putimage w by h, and glamor acceleration tripped over this by making a temporary of the fbPutImage results of size w by h, without running it through the clip first. --- Xext/shm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/shm.c b/Xext/shm.c index 24c6b1087..bef57f37e 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -498,8 +498,8 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC, return; } ValidateGC(&pPixmap->drawable, putGC); - (*putGC->ops->PutImage) (&pPixmap->drawable, putGC, depth, -sx, -sy, w, - h, 0, + (*putGC->ops->PutImage) (&pPixmap->drawable, putGC, depth, -sx, -sy, sw, + sh, 0, (format == XYPixmap) ? XYPixmap : ZPixmap, data); FreeScratchGC(putGC); -- GitLab