glx: Remove support for MESA_swap_frame_usage
authorKristian Høgsberg <krh@bitplanet.net>
Mon, 19 Jul 2010 21:15:42 +0000 (17:15 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 20 Jul 2010 02:45:50 +0000 (22:45 -0400)
The extension never worked, the implementation returns GLX_BAD_CONTEXT
when enabling the frame tracking.

12 files changed:
src/glx/apple/glx_empty.c
src/glx/dri_common.c
src/glx/glxclient.h
src/glx/glxcmds.c
src/glx/glxextensions.c
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/mach64/mach64_screen.c
src/mesa/drivers/dri/mga/mga_xmesa.c
src/mesa/drivers/dri/r128/r128_screen.c
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/unichrome/via_screen.c

index e19bf05d4705844fc1ec1850570d078bb89642af..1569679c7130ca1c86b9cc9c7c786ee23924a69e 100644 (file)
@@ -31,54 +31,6 @@ glXGetSwapIntervalMESA(void)
 }
 
 
-/*
-** GLX_MESA_swap_frame_usage
-*/
-
-int
-glXBeginFrameTrackingMESA(Display * dpy, GLXDrawable drawable)
-{
-   int status = GLX_BAD_CONTEXT;
-   (void) dpy;
-   (void) drawable;
-   return status;
-}
-
-
-int
-glXEndFrameTrackingMESA(Display * dpy, GLXDrawable drawable)
-{
-   int status = GLX_BAD_CONTEXT;
-   (void) dpy;
-   (void) drawable;
-   return status;
-}
-
-
-int
-glXGetFrameUsageMESA(Display * dpy, GLXDrawable drawable, GLfloat * usage)
-{
-   int status = GLX_BAD_CONTEXT;
-   (void) dpy;
-   (void) drawable;
-   (void) usage;
-   return status;
-}
-
-int
-glXQueryFrameTrackingMESA(Display * dpy, GLXDrawable drawable,
-                          int64_t * sbc, int64_t * missedFrames,
-                          GLfloat * lastMissedUsage)
-{
-   int status = GLX_BAD_CONTEXT;
-   (void) dpy;
-   (void) drawable;
-   (void) sbc;
-   (void) missedFrames;
-   (void) lastMissedUsage;
-   return status;
-}
-
 /*
 ** GLX_SGI_video_sync
 */
index 907b05f6391c608f65e447b0c74101cd912b4164..b1d9f32021007e1a511e1a1a63dd7f841536c60c 100644 (file)
@@ -351,13 +351,6 @@ driBindCommonExtensions(__GLXscreenConfigs *psc,
       }
 #endif
 
-#ifdef __DRI_FRAME_TRACKING
-      if (strcmp(extensions[i]->name, __DRI_FRAME_TRACKING) == 0) {
-        psc->frameTracking = (__DRIframeTrackingExtension *) extensions[i];
-        __glXEnableDirectExtension(psc, "GLX_MESA_swap_frame_usage");
-      }
-#endif
-
 #ifdef __DRI_READ_DRAWABLE
       if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) {
         __glXEnableDirectExtension(psc, "GLX_SGI_make_current_read");
index d7af44470f074d904d329752bf677bdfe4e3626a..4ce99050b35e4db05f7069b8b0db513bec8bdfc7 100644 (file)
@@ -540,10 +540,6 @@ struct __GLXscreenConfigsRec
    const __DRIcopySubBufferExtension *driCopySubBuffer;
 #endif
 
-#ifdef __DRI_FRAME_TRACKING
-   const __DRIframeTrackingExtension *frameTracking;
-#endif
-
 #endif
 
     /**
index 4a7360c14974bc8b217571e5733e418bfc57a022..f51df7bca1454764022f01941979df1e6892ebcc 100644 (file)
@@ -2122,107 +2122,6 @@ __glXGetSwapIntervalMESA(void)
 }
 
 
-/*
-** GLX_MESA_swap_frame_usage
-*/
-
-static GLint
-__glXBeginFrameTrackingMESA(Display * dpy, GLXDrawable drawable)
-{
-   int status = GLX_BAD_CONTEXT;
-#ifdef __DRI_FRAME_TRACKING
-   int screen = 0;
-   __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
-   __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
-
-   if (pdraw != NULL && psc->frameTracking != NULL)
-      status = psc->frameTracking->frameTracking(pdraw->driDrawable, GL_TRUE);
-#else
-   (void) dpy;
-   (void) drawable;
-#endif
-   return status;
-}
-
-
-static GLint
-__glXEndFrameTrackingMESA(Display * dpy, GLXDrawable drawable)
-{
-   int status = GLX_BAD_CONTEXT;
-#ifdef __DRI_FRAME_TRACKING
-   int screen = 0;
-   __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
-   __GLXscreenConfigs *psc = GetGLXScreenConfigs(dpy, screen);
-
-   if (pdraw != NULL && psc->frameTracking != NULL)
-      status = psc->frameTracking->frameTracking(pdraw->driDrawable,
-                                                 GL_FALSE);
-#else
-   (void) dpy;
-   (void) drawable;
-#endif
-   return status;
-}
-
-
-static GLint
-__glXGetFrameUsageMESA(Display * dpy, GLXDrawable drawable, GLfloat * usage)
-{
-   int status = GLX_BAD_CONTEXT;
-#ifdef __DRI_FRAME_TRACKING
-   int screen = 0;
-   __GLXDRIdrawable *const pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
-   __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
-
-   if (pdraw != NULL && psc->frameTracking != NULL) {
-      int64_t sbc, missedFrames;
-      float lastMissedUsage;
-
-      status = psc->frameTracking->queryFrameTracking(pdraw->driDrawable,
-                                                      &sbc,
-                                                      &missedFrames,
-                                                      &lastMissedUsage,
-                                                      usage);
-   }
-#else
-   (void) dpy;
-   (void) drawable;
-   (void) usage;
-#endif
-   return status;
-}
-
-
-static GLint
-__glXQueryFrameTrackingMESA(Display * dpy, GLXDrawable drawable,
-                            int64_t * sbc, int64_t * missedFrames,
-                            GLfloat * lastMissedUsage)
-{
-   int status = GLX_BAD_CONTEXT;
-#ifdef __DRI_FRAME_TRACKING
-   int screen = 0;
-   __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
-   __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
-
-   if (pdraw != NULL && psc->frameTracking != NULL) {
-      float usage;
-
-      status = psc->frameTracking->queryFrameTracking(pdraw->driDrawable,
-                                                      sbc, missedFrames,
-                                                      lastMissedUsage,
-                                                      &usage);
-   }
-#else
-   (void) dpy;
-   (void) drawable;
-   (void) sbc;
-   (void) missedFrames;
-   (void) lastMissedUsage;
-#endif
-   return status;
-}
-
-
 /*
 ** GLX_SGI_video_sync
 */
@@ -3072,12 +2971,6 @@ static const struct name_address_pair GLX_functions[] = {
    /*** GLX_MESA_swap_control ***/
    GLX_FUNCTION2(glXSwapIntervalMESA, __glXSwapIntervalMESA),
    GLX_FUNCTION2(glXGetSwapIntervalMESA, __glXGetSwapIntervalMESA),
-
-   /*** GLX_MESA_swap_frame_usage ***/
-   GLX_FUNCTION2(glXBeginFrameTrackingMESA, __glXBeginFrameTrackingMESA),
-   GLX_FUNCTION2(glXEndFrameTrackingMESA, __glXEndFrameTrackingMESA),
-   GLX_FUNCTION2(glXGetFrameUsageMESA, __glXGetFrameUsageMESA),
-   GLX_FUNCTION2(glXQueryFrameTrackingMESA, __glXQueryFrameTrackingMESA),
 #endif
 
    /*** GLX_ARB_get_proc_address ***/
index 762aec527cd83c779ff2ce69d5029f4c559e1333..4eb6a5536ab8273ce3363fff1f2744348a6da814 100644 (file)
@@ -94,10 +94,8 @@ static const struct extension_info known_glx_extensions[] = {
    { GLX(MESA_release_buffers),        VER(0,0), N, N, N, N }, /* Deprecated */
 #ifdef GLX_USE_APPLEGL
    { GLX(MESA_swap_control),           VER(0,0), N, N, N, N },
-   { GLX(MESA_swap_frame_usage),       VER(0,0), N, N, N, N },
 #else
    { GLX(MESA_swap_control),           VER(0,0), Y, N, N, Y },
-   { GLX(MESA_swap_frame_usage),       VER(0,0), Y, N, N, Y },
 #endif
    { GLX(NV_float_buffer),             VER(0,0), N, N, N, N },
    { GLX(NV_render_depth_texture),     VER(0,0), N, N, N, N },
index 18b9035248f7c735273587ef367e34af504c3d1a..dce84ef0deb37e2c6f48f795542f0cece88fa1f0 100644 (file)
@@ -927,41 +927,6 @@ const __DRI2configQueryExtension dri2ConfigQueryExtension = {
    dri2ConfigQueryf,
 };
 
-static int
-driFrameTracking(__DRIdrawable *drawable, GLboolean enable)
-{
-    return GLX_BAD_CONTEXT;
-}
-
-static int
-driQueryFrameTracking(__DRIdrawable *dpriv,
-                     int64_t * sbc, int64_t * missedFrames,
-                     float * lastMissedUsage, float * usage)
-{
-   __DRIswapInfo   sInfo;
-   int             status;
-   int64_t         ust;
-   __DRIscreen *psp = dpriv->driScreenPriv;
-
-   status = dpriv->driScreenPriv->DriverAPI.GetSwapInfo( dpriv, & sInfo );
-   if ( status == 0 ) {
-      *sbc = sInfo.swap_count;
-      *missedFrames = sInfo.swap_missed_count;
-      *lastMissedUsage = sInfo.swap_missed_usage;
-
-      (*psp->systemTime->getUST)( & ust );
-      *usage = driCalculateSwapUsage( dpriv, sInfo.swap_ust, ust );
-   }
-
-   return status;
-}
-
-const __DRIframeTrackingExtension driFrameTrackingExtension = {
-    { __DRI_FRAME_TRACKING, __DRI_FRAME_TRACKING_VERSION },
-    driFrameTracking,
-    driQueryFrameTracking    
-};
-
 /**
  * Calculate amount of swap interval used between GLX buffer swaps.
  * 
index e4c590b13224bfde7c170428ad1ab64b647ca14b..bc647ff8130f6f74d39034715f682c0c7eb9240d 100644 (file)
@@ -70,7 +70,6 @@ extern const __DRIdri2Extension driDRI2Extension;
 extern const __DRIextension driReadDrawableExtension;
 extern const __DRIcopySubBufferExtension driCopySubBufferExtension;
 extern const __DRIswapControlExtension driSwapControlExtension;
-extern const __DRIframeTrackingExtension driFrameTrackingExtension;
 extern const __DRImediaStreamCounterExtension driMediaStreamCounterExtension;
 extern const __DRI2configQueryExtension dri2ConfigQueryExtension;
 
index 4bd6dee6c0e7caaa971ac7b752e57c8fd5c73982..239e8bc8fd09bf014675f186fbca124cb1e033e3 100644 (file)
@@ -256,7 +256,6 @@ mach64CreateScreen( __DRIscreen *sPriv )
    mach64Screen->driScreen = sPriv;
 
    i = 0;
-   mach64Screen->extensions[i++] = &driFrameTrackingExtension.base;
    if ( mach64Screen->irq != 0 ) {
       mach64Screen->extensions[i++] = &driSwapControlExtension.base;
       mach64Screen->extensions[i++] = &driMediaStreamCounterExtension.base;
index 31007ccb1dacf14e40bd628ed6e13add00e9696d..3a31dfb44a3fb87f19b4577022acea6cf0d976a8 100644 (file)
@@ -182,7 +182,6 @@ mgaFillInModes( __DRIscreen *psp,
 const __DRIextension *mgaScreenExtensions[] = {
     &driReadDrawableExtension,
     &driSwapControlExtension.base,
-    &driFrameTrackingExtension.base,
     &driMediaStreamCounterExtension.base,
     NULL
 };
index 2d91802823650ef972af7e1ec966aed974d7f035..7626a159d6a968ab141ada5f0792c448404947fb 100644 (file)
@@ -221,7 +221,6 @@ r128CreateScreen( __DRIscreen *sPriv )
    r128Screen->driScreen = sPriv;
 
    i = 0;
-   r128Screen->extensions[i++] = &driFrameTrackingExtension.base;
    if ( r128Screen->irq != 0 ) {
        r128Screen->extensions[i++] = &driSwapControlExtension.base;
        r128Screen->extensions[i++] = &driMediaStreamCounterExtension.base;
index efe6b2e3bb3e6b373b0a10c8c1add32918f5867f..10969e60905e456a241b4f295b493c292d836174 100644 (file)
@@ -1203,7 +1203,6 @@ radeonCreateScreen( __DRIscreen *sPriv )
 
    i = 0;
    screen->extensions[i++] = &driCopySubBufferExtension.base;
-   screen->extensions[i++] = &driFrameTrackingExtension.base;
    screen->extensions[i++] = &driReadDrawableExtension;
 
    if ( screen->irq != 0 ) {
@@ -1357,7 +1356,6 @@ radeonCreateScreen2(__DRIscreen *sPriv)
 
    i = 0;
    screen->extensions[i++] = &driCopySubBufferExtension.base;
-   screen->extensions[i++] = &driFrameTrackingExtension.base;
    screen->extensions[i++] = &driReadDrawableExtension;
    screen->extensions[i++] = &dri2ConfigQueryExtension.base;
 
index ee10b569bf1d8407b1240b06480c727f4d238ce5..4b3e9d5a38f57dab866d2bd6021cb0dfbeece4d8 100644 (file)
@@ -166,7 +166,6 @@ viaInitDriver(__DRIscreen *sPriv)
     viaScreen->sareaPrivOffset = gDRIPriv->sarea_priv_offset;
 
     i = 0;
-    viaScreen->extensions[i++] = &driFrameTrackingExtension.base;
     viaScreen->extensions[i++] = &driReadDrawableExtension;
     if ( viaScreen->irqEnabled ) {
        viaScreen->extensions[i++] = &driSwapControlExtension.base;