radeon: Drop some remaining DRI1 vblank support code.
authorEric Anholt <eric@anholt.net>
Fri, 14 Oct 2011 21:04:48 +0000 (14:04 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 28 Oct 2011 18:31:11 +0000 (11:31 -0700)
src/mesa/drivers/dri/radeon/radeon_common_context.c
src/mesa/drivers/dri/radeon/radeon_common_context.h
src/mesa/drivers/dri/radeon/radeon_screen.c

index ada010b..dbd0ed2 100644 (file)
@@ -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);
                }
index 2b478e1..1b23481 100644 (file)
@@ -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;
-
 };
 
 
index fed5603..c142239 100644 (file)
@@ -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,
 };