Hi, So GLX has a rule about not swapping pixmaps, and I've been trying to track down why with DRI2 my driver gets requests for swapping pixmaps (piglit glx-swap-pixmap test).
So it appears in the DRI2 buffer swap case, we bypass the GLX protocol and use the DRI2SwapBuffers protocol, now nowhere on the X server checks that the swap is for a Window and not a pixmap, so it happily ends up calling into my driver and executing a page flip and messing up my screen. So the question is whether So is DRI2 pixmap swapping is something someone thought should be legal despite GLX or is it just an oversight? if so trivial patch is attached. Dave.
From 845c00ae2370c55f02c248ece8645438414606ce Mon Sep 17 00:00:00 2001 From: Dave Airlie <[email protected]> Date: Tue, 6 Dec 2011 16:41:57 +0000 Subject: [PATCH] dri2: don't attempt to swap pixmaps Signed-off-by: Dave Airlie <[email protected]> --- hw/xfree86/dri2/dri2.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 0d613be..2418618 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -847,6 +847,9 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, return BadDrawable; } + if (pDraw->type == DRAWABLE_PIXMAP) + return Success; + for (i = 0; i < pPriv->bufferCount; i++) { if (pPriv->buffers[i]->attachment == DRI2BufferFrontLeft) pDestBuffer = (DRI2BufferPtr) pPriv->buffers[i]; -- 1.7.7.3
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
