Fix UpdatePageFlipping() function. Always call driFlipRenderbuffers()
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 4 Sep 2005 16:15:38 +0000 (16:15 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 4 Sep 2005 16:15:38 +0000 (16:15 +0000)
with pfCurrentPage value, in case it's initially 1 instead of 0.

src/mesa/drivers/dri/r128/r128_lock.c
src/mesa/drivers/dri/r200/r200_lock.c
src/mesa/drivers/dri/radeon/radeon_lock.c

index ff11eb68480c19594745dba8628e65ecf81fee6b..d7c35afff37122f15f4a9679899bd144ca670ce9 100644 (file)
@@ -52,10 +52,8 @@ static void
 r128UpdatePageFlipping( r128ContextPtr rmesa )
 {
    rmesa->doPageFlip = rmesa->sarea->pfAllowPageFlip;
-   if (!rmesa->doPageFlip) {
-      driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer, GL_FALSE);
-   }
-
+   driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
+                        rmesa->sarea->pfCurrentPage);
    rmesa->new_state |= R128_NEW_WINDOW;
 }
 
index 1279cd70f9a9cf2a5ecd6ce5d84b138062498b3f..6c619e260744e7fd634c0b39b282d000cf6d3841 100644 (file)
@@ -53,9 +53,8 @@ static void
 r200UpdatePageFlipping( r200ContextPtr rmesa )
 {
    rmesa->doPageFlip = rmesa->sarea->pfState;
-   if (!rmesa->doPageFlip) {
-      driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer, GL_FALSE);
-   }
+   driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
+                        rmesa->sarea->pfCurrentPage);
 }
 
 
index c342b115080b20b9addf86b17d87d8dcf784ed41..144e11d491049c1026def729ef18b92e31917771 100644 (file)
@@ -55,9 +55,8 @@ static void
 radeonUpdatePageFlipping( radeonContextPtr rmesa )
 {
    rmesa->doPageFlip = rmesa->sarea->pfState;
-   if (!rmesa->doPageFlip) {
-      driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer, GL_FALSE);
-   }
+   driFlipRenderbuffers(rmesa->glCtx->WinSysDrawBuffer,
+                        rmesa->sarea->pfCurrentPage);
 }