[Mesa-dev] [PATCH 06/19] glx: Unifdef some dri_interface.h defines.
Kristian Høgsberg
krh at bitplanet.net
Wed Sep 26 08:05:01 PDT 2012
On Tue, Sep 25, 2012 at 10:50 PM, Eric Anholt <eric at anholt.net> wrote:
> dri_interface.h comes from our tree, so why litter our tree with ifdefs for
> older versions of it?
Yeah, lets get rid of those, it's a bad habit carried over form the aiglx code.
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
> 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.
> ---
> src/glx/dri2_glx.c | 15 +--------------
> 1 file changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
> index f2fc187..ff5373c 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);
> @@ -714,7 +710,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();
>
> @@ -722,7 +717,6 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
> (*psc->f->flush)(priv->driDrawable);
> }
> }
> -#endif
>
> dri2Throttle(psc, priv, __DRI2_THROTTLE_SWAPBUFFER);
>
> @@ -844,11 +838,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)
> @@ -863,10 +855,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
> @@ -886,11 +876,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) {
> @@ -1240,9 +1228,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();
> --
> 1.7.10.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list