From c8572d329014afc0c79b5765468dcdfb65be0868 Mon Sep 17 00:00:00 2001 From: Mario Kleiner Date: Thu, 16 Feb 2012 00:45:21 +0100 Subject: dri2: Allow vblank controlled swaps for redirected windows. Part I Make sure that swaps for redirected windows under a compositor are still scheduled via vblank events, to avoid effects like 2900 fps swaps under a compositor. See discussion with Francisco Jerez at: http://lists.freedesktop.org/archives/nouveau/2011-September/009278.html http://lists.freedesktop.org/archives/nouveau/2011-September/009292.html This is part I of the agreed upon band-aid, in a separate patch. It allows to use vblank related functions on redirected windows and thereby fixes functions from sgi_sync_control and oml_sync_control extension, e.g., glXWaitForMscOML(), glXGetSyncValuesOML(), glXWaitVideoSyncSGI, ... Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs --- src/nouveau_dri2.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 719b3bb..6a0800c 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -204,10 +204,8 @@ can_sync_to_vblank(DrawablePtr draw) { ScrnInfoPtr scrn = xf86Screens[draw->pScreen->myNum]; NVPtr pNv = NVPTR(scrn); - PixmapPtr pix = NVGetDrawablePixmap(draw); return pNv->glx_vblank && - nouveau_exa_pixmap_is_onscreen(pix) && nv_window_belongs_to_crtc(scrn, draw->x, draw->y, draw->width, draw->height); } -- cgit v1.2.1