summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2007-10-30 13:16:50 +0100
committerMichel Dänzer <[email protected]>2007-10-30 13:16:50 +0100
commit3177b4e2cf7d2fff7428cb6057bebbe60ff5cc6c (patch)
tree7fdc9e12fd8b95d03e1fe768a9bbb606db8f14e9 /src/mesa/drivers/dri/nouveau
parentdc1264970e585c0939606922b3e964db4b9c28b3 (diff)
More vblank cleanups.
* Fix crash at context creation in most drivers supporting vblank. * Don't pass vblank sequence or flags to functions that get passed the drawable private already. * Attempt to initialize vblank related drawable private fields just once per drawable. May need more work in some drivers.
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 5ef24d82706..4f4128c875d 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -283,7 +283,13 @@ GLboolean nouveauMakeCurrent( __DRIcontextPrivate *driContextPriv,
struct gl_framebuffer *read_fb =
(struct gl_framebuffer*)driReadPriv->driverPrivate;
- driDrawableInitVBlank(driDrawPriv);
+ if (driDrawPriv->swap_interval == (unsigned)-1) {
+ driDrawPriv->vblFlags =
+ driGetDefaultVBlankFlags(&nmesa->optionCache);
+
+ driDrawableInitVBlank(driDrawPriv);
+ }
+
nmesa->driDrawable = driDrawPriv;
_mesa_resize_framebuffer(nmesa->glCtx, draw_fb,