From c35a9388a303d5c54ee549ef05e5d23d991b823d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 25 Sep 2012 09:00:04 -0700 Subject: glx: Unifdef some dri_interface.h defines. 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 --- src/glx/dri2_glx.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src') diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 4ff0b9ed73c..e35ae5e3805 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -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(); -- cgit v1.2.3