summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r128
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/r128
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/r128')
-rw-r--r--src/mesa/drivers/dri/r128/r128_context.c12
-rw-r--r--src/mesa/drivers/dri/r128/r128_ioctl.c4
2 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c
index 25efe5e4cd7..cdea77642bd 100644
--- a/src/mesa/drivers/dri/r128/r128_context.c
+++ b/src/mesa/drivers/dri/r128/r128_context.c
@@ -113,7 +113,6 @@ GLboolean r128CreateContext( const __GLcontextModes *glVisual,
{
GLcontext *ctx, *shareCtx;
__DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
- __DRIdrawablePrivate *dPriv = driContextPriv->driDrawablePriv;
struct dd_function_table functions;
r128ContextPtr rmesa;
r128ScreenPtr r128scrn;
@@ -263,9 +262,6 @@ GLboolean r128CreateContext( const __GLcontextModes *glVisual,
r128DDInitSpanFuncs( ctx );
r128DDInitState( rmesa );
- dPriv->vblFlags = (rmesa->r128Screen->irq != 0)
- ? driGetDefaultVBlankFlags(&rmesa->optionCache) : VBLANK_FLAG_NO_IRQ;
-
driContextPriv->driverPrivate = (void *)rmesa;
#if DO_DEBUG
@@ -348,7 +344,13 @@ r128MakeCurrent( __DRIcontextPrivate *driContextPriv,
newR128Ctx->dirty = R128_UPLOAD_ALL;
}
- driDrawableInitVBlank( driDrawPriv );
+ if (driDrawPriv->swap_interval == (unsigned)-1) {
+ driDrawPriv->vblFlags = (newR128Ctx->r128Screen->irq != 0)
+ ? driGetDefaultVBlankFlags(&newR128Ctx->optionCache)
+ : VBLANK_FLAG_NO_IRQ;
+
+ driDrawableInitVBlank( driDrawPriv );
+ }
newR128Ctx->driDrawable = driDrawPriv;
_mesa_make_current( newR128Ctx->glCtx,
diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.c b/src/mesa/drivers/dri/r128/r128_ioctl.c
index e04c0872f0d..034261a5354 100644
--- a/src/mesa/drivers/dri/r128/r128_ioctl.c
+++ b/src/mesa/drivers/dri/r128/r128_ioctl.c
@@ -282,7 +282,7 @@ void r128CopyBuffer( __DRIdrawablePrivate *dPriv )
}
UNLOCK_HARDWARE( rmesa );
- driWaitForVBlank( dPriv, &dPriv->vblSeq, dPriv->vblFlags, &missed_target );
+ driWaitForVBlank( dPriv, &missed_target );
LOCK_HARDWARE( rmesa );
nbox = dPriv->numClipRects; /* must be in locked region */
@@ -359,7 +359,7 @@ void r128PageFlip( __DRIdrawablePrivate *dPriv )
}
UNLOCK_HARDWARE( rmesa );
- driWaitForVBlank( dPriv, &dPriv->vblSeq, dPriv->vblFlags, &missed_target );
+ driWaitForVBlank( dPriv, &missed_target );
LOCK_HARDWARE( rmesa );
/* The kernel will have been initialized to perform page flipping