Mesa (master): glx/dri1: Remove uncompiled __DRI_SWAP_BUFFER_COUNTER code.

Eric Anholt anholt at kemper.freedesktop.org
Tue Oct 9 21:33:48 UTC 2012


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

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Sep 25 11:40:36 2012 -0700

glx/dri1: Remove uncompiled __DRI_SWAP_BUFFER_COUNTER code.

It's been in place but never enabled since 2010.  Note how one piece called a
DRI2 function, suggesting never being tested.

Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

---

 src/glx/dri_glx.c |   61 -----------------------------------------------------
 1 files changed, 0 insertions(+), 61 deletions(-)

diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 03237d4..de777fb 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -718,61 +718,6 @@ driDestroyScreen(struct glx_screen *base)
       dlclose(psc->driver);
 }
 
-#ifdef __DRI_SWAP_BUFFER_COUNTER
-
-static int
-driDrawableGetMSC(struct glx_screen *base, __GLXDRIdrawable *pdraw,
-		   int64_t *ust, int64_t *msc, int64_t *sbc)
-{
-   struct dri_screen *psc = (struct dri_screen *) base;
-   struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
-
-   if (pdp && psc->sbc && psc->msc)
-      return ( (*psc->msc->getMSC)(psc->driScreen, msc) == 0 &&
-	       (*psc->sbc->getSBC)(pdp->driDrawable, sbc) == 0 && 
-	       __glXGetUST(ust) == 0 );
-}
-
-static int
-driWaitForMSC(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
-	       int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc)
-{
-   struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
-   struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
-
-   if (pdp != NULL && psc->msc != NULL) {
-      ret = (*psc->msc->waitForMSC) (pdp->driDrawable, target_msc,
-				     divisor, remainder, msc, sbc);
-
-      /* __glXGetUST returns zero on success and non-zero on failure.
-       * This function returns True on success and False on failure.
-       */
-      return ret == 0 && __glXGetUST(ust) == 0;
-   }
-}
-
-static int
-driWaitForSBC(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust,
-	       int64_t *msc, int64_t *sbc)
-{
-   struct dri_drawable *pdp = (struct dri_drawable *) pdraw;
-
-   if (pdp != NULL && psc->sbc != NULL) {
-      ret =
-         (*psc->sbc->waitForSBC) (pdp->driDrawable, target_sbc, msc, sbc);
-
-      /* __glXGetUST returns zero on success and non-zero on failure.
-       * This function returns True on success and False on failure.
-       */
-      return ((ret == 0) && (__glXGetUST(ust) == 0));
-   }
-
-   return DRI2WaitSBC(pdp->base.psc->dpy,
-		      pdp->base.xDrawable, target_sbc, ust, msc, sbc);
-}
-
-#endif
-
 static int
 driSetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
 {
@@ -899,12 +844,6 @@ driCreateScreen(int screen, struct glx_display *priv)
    psp->createDrawable = driCreateDrawable;
    psp->swapBuffers = driSwapBuffers;
 
-#ifdef __DRI_SWAP_BUFFER_COUNTER
-   psp->getDrawableMSC = driDrawableGetMSC;
-   psp->waitForMSC = driWaitForMSC;
-   psp->waitForSBC = driWaitForSBC;
-#endif
-
    psp->setSwapInterval = driSetSwapInterval;
    psp->getSwapInterval = driGetSwapInterval;
 




More information about the mesa-commit mailing list