diff options
author | Michel Dänzer <[email protected]> | 2007-10-30 13:16:50 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2007-10-30 13:16:50 +0100 |
commit | 3177b4e2cf7d2fff7428cb6057bebbe60ff5cc6c (patch) | |
tree | 7fdc9e12fd8b95d03e1fe768a9bbb606db8f14e9 /src/mesa/drivers/dri/mach64 | |
parent | dc1264970e585c0939606922b3e964db4b9c28b3 (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/mach64')
-rw-r--r-- | src/mesa/drivers/dri/mach64/mach64_context.c | 14 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mach64/mach64_ioctl.c | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c index 138e84decb9..f730c831e4d 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.c +++ b/src/mesa/drivers/dri/mach64/mach64_context.c @@ -100,7 +100,6 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual, { GLcontext *ctx, *shareCtx; __DRIscreenPrivate *driScreen = driContextPriv->driScreenPriv; - __DRIdrawablePrivate *dPriv = driContextPriv->driDrawablePriv; struct dd_function_table functions; mach64ContextPtr mmesa; mach64ScreenPtr mach64Screen; @@ -254,9 +253,6 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual, mmesa->do_irqs = (mmesa->mach64Screen->irq && !getenv("MACH64_NO_IRQS")); - dPriv->vblFlags = (mmesa->do_irqs) - ? driGetDefaultVBlankFlags(&mmesa->optionCache) : VBLANK_FLAG_NO_IRQ; - driContextPriv->driverPrivate = (void *)mmesa; if (driQueryOptionb(&mmesa->optionCache, "no_rast")) { @@ -331,9 +327,15 @@ mach64MakeCurrent( __DRIcontextPrivate *driContextPriv, } - driDrawableInitVBlank( driDrawPriv ); - if ( newMach64Ctx->driDrawable != driDrawPriv ) { + if (driDrawPriv->swap_interval == (unsigned)-1) { + driDrawPriv->vblFlags = (newMach64Ctx->do_irqs) + ? driGetDefaultVBlankFlags(&newMach64Ctx->optionCache) + : VBLANK_FLAG_NO_IRQ; + + driDrawableInitVBlank( driDrawPriv ); + } + newMach64Ctx->driDrawable = driDrawPriv; mach64CalcViewport( newMach64Ctx->glCtx ); } diff --git a/src/mesa/drivers/dri/mach64/mach64_ioctl.c b/src/mesa/drivers/dri/mach64/mach64_ioctl.c index 7405a27f8eb..3bcec50cf81 100644 --- a/src/mesa/drivers/dri/mach64/mach64_ioctl.c +++ b/src/mesa/drivers/dri/mach64/mach64_ioctl.c @@ -320,7 +320,7 @@ void mach64CopyBuffer( __DRIdrawablePrivate *dPriv ) #endif UNLOCK_HARDWARE( mmesa ); - driWaitForVBlank( dPriv, &dPriv->vblSeq, dPriv->vblFlags, &missed_target ); + driWaitForVBlank( dPriv, &missed_target ); LOCK_HARDWARE( mmesa ); /* use front buffer cliprects */ |