Mesa (radeon-rewrite): radeon: make state atom print like old r300 code

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


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

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

radeon: make state atom print like old r300 code

---

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

diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index e816760..6b161ef 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -574,14 +574,15 @@ void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv,
 }
 
 
-static void radeon_print_state_atom( struct radeon_state_atom *state )
+static void radeon_print_state_atom(radeonContextPtr radeon, struct radeon_state_atom *state )
 {
 	int i;
+	int dwords = (*state->check)(radeon->glCtx, state);
 
-	fprintf(stderr, "emit %s/%d\n", state->name, state->cmd_size);
+	fprintf(stderr, "emit %s %d/%d\n", state->name, state->cmd_size, dwords);
 
 	if (RADEON_DEBUG & DEBUG_VERBOSE) 
-		for (i = 0 ; i < state->cmd_size ; i++) 
+		for (i = 0 ; i < dwords; i++) 
 			fprintf(stderr, "\t%s[%d]: %x\n", state->name, i, state->cmd[i]);
 
 }
@@ -601,7 +602,7 @@ static INLINE void radeonEmitAtoms(radeonContextPtr radeon, GLboolean dirty)
 			dwords = (*atom->check) (radeon->glCtx, atom);
 			if (dwords) {
 				if (DEBUG_CMDBUF && RADEON_DEBUG & DEBUG_STATE) {
-					radeon_print_state_atom(atom);
+					radeon_print_state_atom(radeon, atom);
 				}
 				if (atom->emit) {
 					(*atom->emit)(radeon->glCtx, atom);




More information about the mesa-commit mailing list