summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-09-27 14:03:24 -0700
committerJakob Bornecrantz <[email protected]>2009-09-28 21:26:13 -0700
commite226bf8a5d1e916b6c99397987eea4f31ee5de3b (patch)
treeda725a63b9c02e5f909db48b594a0da43d21a6a2 /src
parentd492e7b017178c03b4979cf4ff266162d83c4f37 (diff)
st/xorg: Make debug printing optional
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_composite.c2
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c15
2 files changed, 15 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c
index 9d15a615f15..7037d17e43f 100644
--- a/src/gallium/state_trackers/xorg/xorg_composite.c
+++ b/src/gallium/state_trackers/xorg/xorg_composite.c
@@ -829,7 +829,7 @@ static void renderer_copy_texture(struct exa_context *exa,
t1 = 1;
#endif
-#if 1
+#if 0
debug_printf("copy texture src=[%f, %f, %f, %f], dst=[%f, %f, %f, %f], tex=[%f, %f, %f, %f]\n",
sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2,
s0, t0, s1, t1);
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 3f48ab98ac5..f3d7d6eddd5 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -47,6 +47,7 @@
#include "util/u_rect.h"
+#define DEBUG_PRINT 0
#define DEBUG_SOLID 0
#define DISABLE_ACCEL 0
@@ -282,7 +283,7 @@ ExaPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planeMask, Pixel fg)
struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pPixmap);
struct exa_context *exa = ms->exa;
-#if 1
+#if DEBUG_PRINT
debug_printf("ExaPrepareSolid(0x%x)\n", fg);
#endif
if (!EXA_PM_IS_SOLID(&pPixmap->drawable, planeMask))
@@ -322,7 +323,9 @@ ExaSolid(PixmapPtr pPixmap, int x0, int y0, int x1, int y1)
struct exa_context *exa = ms->exa;
struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pPixmap);
+#if DEBUG_PRINT
debug_printf("\tExaSolid(%d, %d, %d, %d)\n", x0, y0, x1, y1);
+#endif
#if 0
if (x0 == 0 && y0 == 0 &&
@@ -376,7 +379,9 @@ ExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pDstPixmap);
struct exa_pixmap_priv *src_priv = exaGetPixmapDriverPrivate(pSrcPixmap);
+#if DEBUG_PRINT
debug_printf("ExaPrepareCopy\n");
+#endif
if (alu != GXcopy)
return FALSE;
@@ -420,8 +425,10 @@ ExaCopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY,
struct exa_context *exa = ms->exa;
struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pDstPixmap);
+#if DEBUG_PRINT
debug_printf("\tExaCopy(srcx=%d, srcy=%d, dstX=%d, dstY=%d, w=%d, h=%d)\n",
srcX, srcY, dstX, dstY, width, height);
+#endif
debug_assert(priv == exa->copy.dst);
@@ -440,7 +447,9 @@ ExaPrepareComposite(int op, PicturePtr pSrcPicture,
struct exa_context *exa = ms->exa;
struct exa_pixmap_priv *priv;
+#if DEBUG_PRINT
debug_printf("ExaPrepareComposite\n");
+#endif
priv = exaGetPixmapDriverPrivate(pDst);
if (!priv || !priv->tex ||
@@ -488,7 +497,9 @@ ExaComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
struct exa_context *exa = ms->exa;
struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pDst);
+#if DEBUG_PRINT
debug_printf("\tExaComposite\n");
+#endif
xorg_composite(exa, priv, srcX, srcY, maskX, maskY,
dstX, dstY, width, height);
@@ -503,8 +514,10 @@ ExaCheckComposite(int op,
pSrcPicture,
pMaskPicture,
pDstPicture);
+#if DEBUG_PRINT
debug_printf("ExaCheckComposite(%d, %p, %p, %p) = %d\n",
op, pSrcPicture, pMaskPicture, pDstPicture, accelerated);
+#endif
return accelerated;
}