summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/mga
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/mga')
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c12
-rw-r--r--src/mesa/drivers/dri/mga/mgaioctl.c4
-rw-r--r--src/mesa/drivers/dri/mga/mgaioctl.h2
3 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c
index 31042f9739b..896f2d94fc6 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c
@@ -452,7 +452,6 @@ mgaCreateContext( const __GLcontextModes *mesaVis,
GLcontext *ctx, *shareCtx;
mgaContextPtr mmesa;
__DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
- __DRIdrawablePrivate *dPriv = driContextPriv->driDrawablePriv;
mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *)sPriv->private;
drm_mga_sarea_t *saPriv = (drm_mga_sarea_t *)(((char*)sPriv->pSAREA)+
mgaScreen->sarea_priv_offset);
@@ -651,9 +650,6 @@ mgaCreateContext( const __GLcontextModes *mesaVis,
debug_control );
#endif
- dPriv->vblFlags = (mmesa->mgaScreen->irq == 0)
- ? VBLANK_FLAG_NO_IRQ : driGetDefaultVBlankFlags(&mmesa->optionCache);
-
(*dri_interface->getUST)( & mmesa->swap_ust );
if (driQueryOptionb(&mmesa->optionCache, "no_rast")) {
@@ -883,7 +879,13 @@ mgaMakeCurrent(__DRIcontextPrivate *driContextPriv,
mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate;
if (mmesa->driDrawable != driDrawPriv) {
- driDrawableInitVBlank( driDrawPriv );
+ if (driDrawPriv->swap_interval == (unsigned)-1) {
+ driDrawPriv->vblFlags = (mmesa->mgaScreen->irq == 0)
+ ? VBLANK_FLAG_NO_IRQ
+ : driGetDefaultVBlankFlags(&mmesa->optionCache);
+
+ driDrawableInitVBlank( driDrawPriv );
+ }
mmesa->driDrawable = driDrawPriv;
mmesa->dirty = ~0;
diff --git a/src/mesa/drivers/dri/mga/mgaioctl.c b/src/mesa/drivers/dri/mga/mgaioctl.c
index 94126a31f91..ff26b9475b9 100644
--- a/src/mesa/drivers/dri/mga/mgaioctl.c
+++ b/src/mesa/drivers/dri/mga/mgaioctl.c
@@ -409,7 +409,7 @@ static void mgaWaitForFrameCompletion( mgaContextPtr mmesa )
/*
* Copy the back buffer to the front buffer.
*/
-void mgaCopyBuffer( const __DRIdrawablePrivate *dPriv )
+void mgaCopyBuffer( __DRIdrawablePrivate *dPriv )
{
mgaContextPtr mmesa;
drm_clip_rect_t *pbox;
@@ -428,7 +428,7 @@ void mgaCopyBuffer( const __DRIdrawablePrivate *dPriv )
FLUSH_BATCH( mmesa );
mgaWaitForFrameCompletion( mmesa );
- driWaitForVBlank( dPriv, & dPriv->vblSeq, dPriv->vblFlags, & missed_target );
+ driWaitForVBlank( dPriv, & missed_target );
if ( missed_target ) {
mmesa->swap_missed_count++;
(void) (*dri_interface->getUST)( & mmesa->swap_missed_ust );
diff --git a/src/mesa/drivers/dri/mga/mgaioctl.h b/src/mesa/drivers/dri/mga/mgaioctl.h
index f3ae749ca99..0ea0ba1acd4 100644
--- a/src/mesa/drivers/dri/mga/mgaioctl.h
+++ b/src/mesa/drivers/dri/mga/mgaioctl.h
@@ -33,7 +33,7 @@
#include "mgacontext.h"
#include "mga_xmesa.h"
-void mgaCopyBuffer( const __DRIdrawablePrivate *dPriv );
+void mgaCopyBuffer( __DRIdrawablePrivate *dPriv );
void mgaWaitForVBlank( mgaContextPtr mmesa );
void mgaGetILoadBufferLocked( mgaContextPtr mmesa );