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/r128/r128_context.c | |
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/r128/r128_context.c')
-rw-r--r-- | src/mesa/drivers/dri/r128/r128_context.c | 12 |
1 files changed, 7 insertions, 5 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, |