mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
glx/drisw: fix shm put image fallback
The fallback to the non-shm put path used the wrong width here
as the pixmap is still allocated in a shared segment, so the
width needs to reflect that.
Fixes: 02c3dad0f3 ("Call shmget() with permission 0600 instead of 0777")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3823>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3823>
This commit is contained in:
parent
246e4aeaef
commit
84395190ec
1 changed files with 3 additions and 4 deletions
|
|
@ -193,14 +193,13 @@ swrastXPutImage(__DRIdrawable * draw, int op,
|
|||
ximage->bytes_per_line = stride ? stride : bytes_per_line(w * ximage->bits_per_pixel, 32);
|
||||
ximage->data = data;
|
||||
|
||||
ximage->width = ximage->bytes_per_line / ((ximage->bits_per_pixel + 7)/ 8);
|
||||
ximage->height = h;
|
||||
|
||||
if (pdp->shminfo.shmid >= 0) {
|
||||
ximage->width = ximage->bytes_per_line / ((ximage->bits_per_pixel + 7)/ 8);
|
||||
ximage->height = h;
|
||||
XShmPutImage(dpy, drawable, gc, ximage, srcx, srcy, x, y, w, h, False);
|
||||
XSync(dpy, False);
|
||||
} else {
|
||||
ximage->width = w;
|
||||
ximage->height = h;
|
||||
XPutImage(dpy, drawable, gc, ximage, srcx, srcy, x, y, w, h);
|
||||
}
|
||||
ximage->data = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue