glx: Unifdef some dri_interface.h defines.
authorEric Anholt <eric@anholt.net>
Tue, 25 Sep 2012 16:00:04 +0000 (09:00 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 9 Oct 2012 21:32:02 +0000 (14:32 -0700)
dri_interface.h comes from our tree, so why litter our tree with ifdefs for
older versions of it?

I left in the DRI_TEX_BUFFER_VERSION ifdefs, which is broken and uncompiled
(the version wasn't bumped from 2 to 3 when the patch was landed), but I don't
know what should be done with it.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/glx/dri2_glx.c

index 4ff0b9ed73c826e6df9d53b4e0638a679502e814..e35ae5e38055a215b0c85b013da90dca97869d12 100644 (file)
@@ -511,10 +511,8 @@ __dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y,
    xrect.width = width;
    xrect.height = height;
 
-#ifdef __DRI2_FLUSH
    if (psc->f)
       (*psc->f->flush) (priv->driDrawable);
-#endif
 
    dri2Throttle(psc, priv, reason);
 
@@ -553,10 +551,8 @@ dri2_copy_drawable(struct dri2_drawable *priv, int dest, int src)
    xrect.width = priv->width;
    xrect.height = priv->height;
 
-#ifdef __DRI2_FLUSH
    if (psc->f)
       (*psc->f->flush) (priv->driDrawable);
-#endif
 
    region = XFixesCreateRegion(psc->base.dpy, &xrect, 1);
    DRI2CopyRegion(psc->base.dpy, priv->base.xDrawable, region, dest, src);
@@ -715,7 +711,6 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
                           __DRI2_THROTTLE_SWAPBUFFER);
     } else {
 #ifdef X_DRI2SwapBuffers
-#ifdef __DRI2_FLUSH
     if (psc->f) {
        struct glx_context *gc = __glXGetCurrentContext();
 
@@ -723,7 +718,6 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
          (*psc->f->flush)(priv->driDrawable);
        }
     }
-#endif
 
        dri2Throttle(psc, priv, __DRI2_THROTTLE_SWAPBUFFER);
 
@@ -845,11 +839,9 @@ static const __DRIdri2LoaderExtension dri2LoaderExtension_old = {
    NULL,
 };
 
-#ifdef __DRI_USE_INVALIDATE
 static const __DRIuseInvalidateExtension dri2UseInvalidate = {
    { __DRI_USE_INVALIDATE, __DRI_USE_INVALIDATE_VERSION }
 };
-#endif
 
 _X_HIDDEN void
 dri2InvalidateBuffers(Display *dpy, XID drawable)
@@ -864,10 +856,8 @@ dri2InvalidateBuffers(Display *dpy, XID drawable)
 
    psc = (struct dri2_screen *) pdraw->psc;
 
-#if __DRI2_FLUSH_VERSION >= 3
    if (pdraw && psc->f && psc->f->base.version >= 3 && psc->f->invalidate)
        psc->f->invalidate(pdp->driDrawable);
-#endif
 }
 
 static void
@@ -887,11 +877,9 @@ dri2_bind_tex_image(Display * dpy,
    if (pdraw != NULL) {
       psc = (struct dri2_screen *) base->psc;
 
-#if __DRI2_FLUSH_VERSION >= 3
       if (!pdp->invalidateAvailable && psc->f &&
            psc->f->base.version >= 3 && psc->f->invalidate)
         psc->f->invalidate(pdraw->driDrawable);
-#endif
 
       if (psc->texBuffer->base.version >= 2 &&
          psc->texBuffer->setTexBuffer2 != NULL) {
@@ -1241,9 +1229,8 @@ dri2CreateDisplay(Display * dpy)
    
    pdp->loader_extensions[i++] = &systemTimeExtension.base;
 
-#ifdef __DRI_USE_INVALIDATE
    pdp->loader_extensions[i++] = &dri2UseInvalidate.base;
-#endif
+
    pdp->loader_extensions[i++] = NULL;
 
    pdp->dri2Hash = __glxHashCreate();