Mesa (master): radeon: Drop some remaining DRI1 vblank support code.

Eric Anholt anholt at kemper.freedesktop.org
Fri Oct 28 11:39:38 PDT 2011


Module: Mesa
Branch: master
Commit: eb135fe8c16388cd33b424ee3915ae52d20cb3ff
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb135fe8c16388cd33b424ee3915ae52d20cb3ff

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Oct 14 14:04:48 2011 -0700

radeon: Drop some remaining DRI1 vblank support code.

---

 .../drivers/dri/radeon/radeon_common_context.c     |    9 -----
 .../drivers/dri/radeon/radeon_common_context.h     |   16 ---------
 src/mesa/drivers/dri/radeon/radeon_screen.c        |   33 --------------------
 3 files changed, 0 insertions(+), 58 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index ada010b..dbd0ed2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -716,7 +716,6 @@ GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv,
 			    __DRIdrawable * driReadPriv)
 {
 	radeonContextPtr radeon;
-	struct radeon_framebuffer *rdrfb;
 	struct gl_framebuffer *drfb, *readfb;
 
 	if (!driContextPriv) {
@@ -766,9 +765,7 @@ GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv,
 
 	if (radeon->glCtx->DrawBuffer == drfb) {
 		if(driDrawPriv != NULL) {
-			rdrfb = (struct radeon_framebuffer *)drfb;
 			if (driDrawPriv->swap_interval == (unsigned)-1) {
-				int i;
 				driDrawPriv->vblFlags =
 					(radeon->radeonScreen->irq != 0)
 					? driGetDefaultVBlankFlags(&radeon->
@@ -776,12 +773,6 @@ GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv,
 					: VBLANK_FLAG_NO_IRQ;
 
 				driDrawableInitVBlank(driDrawPriv);
-				rdrfb->vbl_waited = driDrawPriv->vblSeq;
-
-				for (i = 0; i < 2; i++) {
-					if (rdrfb->color_rb[i])
-						rdrfb->color_rb[i]->vbl_pending = driDrawPriv->vblSeq;
-				}
 			}
 			radeon_window_moved(radeon);
 		}
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h
index 2b478e1..1b23481 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
@@ -91,7 +91,6 @@ struct radeon_renderbuffer
 	int has_surface;
 
 	GLuint pf_pending;  /**< sequence number of pending flip */
-	GLuint vbl_pending;   /**< vblank sequence number of pending flip */
 	__DRIdrawable *dPriv;
 
 	/* r6xx+ tiling */
@@ -107,21 +106,6 @@ struct radeon_framebuffer
 	struct gl_framebuffer base;
 
 	struct radeon_renderbuffer *color_rb[2];
-
-	GLuint vbl_waited;
-
-	/* buffer swap */
-	int64_t swap_ust;
-	int64_t swap_missed_ust;
-
-	GLuint swap_count;
-	GLuint swap_missed_count;
-
-	/* Drawable page flipping state */
-	GLboolean pf_active;
-	GLint pf_current_page;
-	GLint pf_num_pages;
-
 };
 
 
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index fed5603..c142239 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -135,8 +135,6 @@ static const GLuint __driNConfigOptions = 17;
 
 #endif
 
-static int getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo );
-
 #ifndef RADEON_INFO_TILE_CONFIG
 #define RADEON_INFO_TILE_CONFIG 0x6
 #endif
@@ -1537,32 +1535,6 @@ __DRIconfig **radeonInitScreen2(__DRIscreen *psp)
    return (const __DRIconfig **)configs;
 }
 
-/**
- * Get information about previous buffer swaps.
- */
-static int
-getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo )
-{
-    struct radeon_framebuffer *rfb;
-
-    if ( (dPriv == NULL) || (dPriv->driContextPriv == NULL)
-	 || (dPriv->driContextPriv->driverPrivate == NULL)
-	 || (sInfo == NULL) ) {
-	return -1;
-   }
-
-    rfb = dPriv->driverPrivate;
-    sInfo->swap_count = rfb->swap_count;
-    sInfo->swap_ust = rfb->swap_ust;
-    sInfo->swap_missed_count = rfb->swap_missed_count;
-
-   sInfo->swap_missed_usage = (sInfo->swap_missed_count != 0)
-       ? driCalculateSwapUsage( dPriv, 0, rfb->swap_missed_ust )
-       : 0.0;
-
-   return 0;
-}
-
 const struct __DriverAPIRec driDriverAPI = {
    .DestroyScreen   = radeonDestroyScreen,
 #if defined(RADEON_R200)
@@ -1576,11 +1548,6 @@ const struct __DriverAPIRec driDriverAPI = {
    .DestroyBuffer   = radeonDestroyBuffer,
    .MakeCurrent     = radeonMakeCurrent,
    .UnbindContext   = radeonUnbindContext,
-   .GetSwapInfo     = getSwapInfo,
-   .GetDrawableMSC  = driDrawableGetMSC32,
-   .WaitForMSC      = driWaitForMSC32,
-   .WaitForSBC      = NULL,
-   .SwapBuffersMSC  = NULL,
     /* DRI2 */
    .InitScreen2     = radeonInitScreen2,
 };



More information about the mesa-commit mailing list