diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-06 14:26:38 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-06 14:26:38 +0000 |
commit | 28810d5b367942c96acbc696f27105259422a0d1 (patch) | |
tree | 8eb124b64712b90b301137c90424bb954f0eab63 /src/uxa/intel_dri.c | |
parent | 4d8f78bc95f8dd36693f74365dbc3c442fbbf8a9 (diff) |
uxa/dri: Pixmap are offscreen and not attached to any display
As the code current assumes that pixmaps are located at screen origin
(0,0), it assumes that they are all on the first CRTC. However, since
they are offscreen, this leads to such complications as attempting to
emit vsync swapbuffers, and even worse attempting to swap a GLXPixmap
onto the scanout following a DRI2SwapBuffers.
Reported-by: Alexander Monakov <amonakov@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73282
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/uxa/intel_dri.c')
-rw-r--r-- | src/uxa/intel_dri.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c index 08a0bd43..1d7efab4 100644 --- a/src/uxa/intel_dri.c +++ b/src/uxa/intel_dri.c @@ -581,7 +581,7 @@ I830DRI2DrawablePipe(DrawablePtr pDraw) ScreenPtr pScreen = pDraw->pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); BoxRec box, crtcbox; - xf86CrtcPtr crtc; + xf86CrtcPtr crtc = NULL; int pipe = -1; box.x1 = pDraw->x; @@ -589,7 +589,8 @@ I830DRI2DrawablePipe(DrawablePtr pDraw) box.x2 = box.x1 + pDraw->width; box.y2 = box.y1 + pDraw->height; - crtc = intel_covering_crtc(pScrn, &box, NULL, &crtcbox); + if (pDraw->type != DRAWABLE_PIXMAP) + crtc = intel_covering_crtc(pScrn, &box, NULL, &crtcbox); /* Make sure the CRTC is valid and this is the real front buffer */ if (crtc != NULL && !crtc->rotatedData) |