Mesa (radeon-rewrite): radeon: add some debugging for flush ioctls

Dave Airlie airlied at kemper.freedesktop.org
Mon Feb 23 04:08:01 UTC 2009


Module: Mesa
Branch: radeon-rewrite
Commit: 77161c5ff51a7b8fcd7043b94c2cb86cb1d57d79
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=77161c5ff51a7b8fcd7043b94c2cb86cb1d57d79

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Feb 23 13:33:35 2009 +1000

radeon: add some debugging for flush ioctls

---

 src/mesa/drivers/dri/radeon/radeon_common.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 6b161ef..3c491d5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -715,6 +715,12 @@ int rcommonFlushCmdBufLocked(radeonContextPtr rmesa, const char *caller)
 		exit(-1);
 	}
 	rmesa->cmdbuf.flushing = 1;
+
+	if (RADEON_DEBUG & DEBUG_IOCTL) {
+		fprintf(stderr, "%s from %s - %i cliprects\n",
+			__FUNCTION__, caller, rmesa->numClipRects);
+	}
+
 	if (rmesa->cmdbuf.cs->cdw) {
 		ret = radeon_cs_emit(rmesa->cmdbuf.cs);
 		rmesa->hw.all_dirty = GL_TRUE;
@@ -832,6 +838,11 @@ void rcommonBeginBatch(radeonContextPtr rmesa, int n,
 		radeonEmitState(rmesa);
 	}
 	radeon_cs_begin(rmesa->cmdbuf.cs, n, file, function, line);
+
+        if (DEBUG_CMDBUF && RADEON_DEBUG & DEBUG_IOCTL)
+                fprintf(stderr, "BEGIN_BATCH(%d) at %d, from %s:%i\n",
+                        n, rmesa->cmdbuf.cs->cdw, function, line);
+
 }
 
 




More information about the mesa-commit mailing list