xserver/hw/kdrive/ati ati.h, 1.15, 1.16 ati_draw.c, 1.32,
1.33 ati_draw.h, 1.8, 1.9
Eric Anholt
xserver-commit at pdx.freedesktop.org
Sun Feb 20 19:44:13 PST 2005
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/ati
In directory gabe:/tmp/cvs-serv11272
Modified Files:
ati.h ati_draw.c ati_draw.h
Log Message:
Move the draw tracing supplies into ati_draw.h, and do some touchups on it.
(When tracing drawing, I want to know what I'm drawing to, at a minimum).
Index: ati.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ati.h 27 Jan 2005 03:50:48 -0000 1.15
+++ ati.h 21 Feb 2005 03:44:10 -0000 1.16
@@ -342,22 +342,6 @@
void
R300CGWorkaround(ATIScreenInfo *atis);
-#define ATI_TRACE 0
-
-#if ATI_TRACE
-#define ENTER_DRAW(pix) ATIEnterDraw(pix, __FUNCTION__)
-#define LEAVE_DRAW(pix) ATILeaveDraw(pix, __FUNCTION__)
-
-void
-ATIEnterDraw (PixmapPtr pPixmap, char *function);
-
-void
-ATILeaveDraw (PixmapPtr pPixmap, char *function);
-#else
-#define ENTER_DRAW(pix)
-#define LEAVE_DRAW(pix)
-#endif
-
/* ati_draw.c */
void
ATIDrawSetup(ScreenPtr pScreen);
Index: ati_draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati_draw.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ati_draw.c 27 Jan 2005 05:25:57 -0000 1.32
+++ ati_draw.c 21 Feb 2005 03:44:10 -0000 1.33
@@ -221,29 +221,28 @@
LEAVE_DRAW(0);
}
-#if ATI_TRACE
+#if ATI_TRACE_DRAW
void
ATIEnterDraw (PixmapPtr pPix, char *function)
{
- if (pPix)
- {
+ if (pPix != NULL) {
KdScreenPriv(pPix->drawable.pScreen);
CARD32 offset;
offset = ((CARD8 *)pPix->devPrivate.ptr -
pScreenPriv->screen->memory_base);
- ErrorF ("Enter %s 0x%x\n", function, offset);
- }
- else
+ ErrorF ("Enter %s 0x%x (%dx%dx%d/%d)\n", function, offset,
+ pPix->drawable.width, pPix->drawable.height, pPix->drawable.depth,
+ pPix->drawable.bitsPerPixel);
+ } else
ErrorF ("Enter %s\n", function);
}
void
ATILeaveDraw (PixmapPtr pPix, char *function)
{
- if (pPix)
- {
+ if (pPix != NULL) {
KdScreenPriv(pPix->drawable.pScreen);
CARD32 offset;
@@ -251,8 +250,7 @@
pScreenPriv->screen->memory_base);
ErrorF ("Leave %s 0x%x\n", function, offset);
- }
- else
+ } else
ErrorF ("Leave %s\n", function);
}
#endif
Index: ati_draw.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati_draw.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ati_draw.h 11 Sep 2004 09:28:19 -0000 1.8
+++ ati_draw.h 21 Feb 2005 03:44:10 -0000 1.9
@@ -63,7 +63,10 @@
void RadeonSwitchTo3D(ATIScreenInfo *atis);
void ATIWaitIdle(ATIScreenInfo *atis);
-#if 0
+#define ATI_TRACE_FALL 0
+#define ATI_TRACE_DRAW 0
+
+#if ATI_TRACE_FALL
#define ATI_FALLBACK(x) \
do { \
ErrorF("%s: ", __FUNCTION__); \
@@ -74,4 +77,18 @@
#define ATI_FALLBACK(x) return FALSE
#endif
+#if ATI_TRACE_DRAW
+#define ENTER_DRAW(pix) ATIEnterDraw(pix, __FUNCTION__)
+#define LEAVE_DRAW(pix) ATILeaveDraw(pix, __FUNCTION__)
+
+void
+ATIEnterDraw (PixmapPtr pPixmap, char *function);
+
+void
+ATILeaveDraw (PixmapPtr pPixmap, char *function);
+#else /* ATI_TRACE */
+#define ENTER_DRAW(pix)
+#define LEAVE_DRAW(pix)
+#endif /* !ATI_TRACE */
+
#endif /* _ATI_DRAW_H_ */
More information about the xserver-commit
mailing list