diff options
| author | Jakob Bornecrantz <jakob@vmware.com> | 2009-10-18 07:50:14 +0200 | 
|---|---|---|
| committer | Jakob Bornecrantz <jakob@vmware.com> | 2009-10-18 15:46:24 +0200 | 
| commit | 68b5dc9634a39b5aa84fe963676b4fd0249363cf (patch) | |
| tree | 482f91c52f212de0c1ffad8133466dc67e969437 | |
| parent | ec5c23551cdb4c369d8f8f392208f4d4bf29911b (diff) | |
st/xorg: Change how disable accel is handled
| -rw-r--r-- | src/gallium/state_trackers/xorg/xorg_exa.c | 27 | 
1 files changed, 6 insertions, 21 deletions
| diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c index 4988af4864..a1c07218cb 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa.c +++ b/src/gallium/state_trackers/xorg/xorg_exa.c @@ -47,7 +47,7 @@  #define DEBUG_PRINT 0  #define DEBUG_SOLID 0 -#define DISABLE_ACCEL 0 +#define ACCEL_ENABLED TRUE  /*   * Helper functions @@ -307,11 +307,7 @@ ExaPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planeMask, Pixel fg)      fg = 0xffff0000;  #endif -#if DISABLE_ACCEL -    return FALSE; -#else -    return xorg_solid_bind_state(exa, priv, fg); -#endif +    return ACCEL_ENABLED && xorg_solid_bind_state(exa, priv, fg);  }  static void @@ -409,11 +405,7 @@ ExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,      exa->copy.src = src_priv;      exa->copy.dst = priv; -#if DISABLE_ACCEL -    return FALSE; -#else -    return TRUE; -#endif +    return ACCEL_ENABLED;  }  static void @@ -484,16 +476,12 @@ ExaPrepareComposite(int op, PicturePtr pSrcPicture,           XORG_FALLBACK("pMask format: %s", pf_name(priv->tex->format));     } -#if DISABLE_ACCEL -   (void) exa; -   return FALSE; -#else -   return xorg_composite_bind_state(exa, op, pSrcPicture, pMaskPicture, +   return ACCEL_ENABLED && +          xorg_composite_bind_state(exa, op, pSrcPicture, pMaskPicture,                                      pDstPicture,                                      pSrc ? exaGetPixmapDriverPrivate(pSrc) : NULL,                                      pMask ? exaGetPixmapDriverPrivate(pMask) : NULL,                                      exaGetPixmapDriverPrivate(pDst)); -#endif  }  static void @@ -526,10 +514,7 @@ ExaCheckComposite(int op,     debug_printf("ExaCheckComposite(%d, %p, %p, %p) = %d\n",                  op, pSrcPicture, pMaskPicture, pDstPicture, accelerated);  #endif -#if DISABLE_ACCEL -   accelerated = FALSE; -#endif -   return accelerated; +   return ACCEL_ENABLED && accelerated;  }  static void * | 
