diff options
author | Pauli Nieminen <[email protected]> | 2009-08-24 18:44:53 +0300 |
---|---|---|
committer | Pauli Nieminen <[email protected]> | 2009-08-24 18:45:30 +0300 |
commit | 55c0457fe9574452b3c2558ada160c42a3e1fbdc (patch) | |
tree | b6edb6acaf7f59156e59bf51dbdf3b4ee5924d0e /src/mesa/drivers | |
parent | ec61f677c322c30771c351c5f0b79c917caf2a49 (diff) |
radeon: Add debug output to radeonCountStateEmitSize.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_common.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index 9f901d2c0af..8f34fbf6bc4 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -966,18 +966,31 @@ static void radeon_print_state_atom(radeonContextPtr radeon, struct radeon_state GLuint radeonCountStateEmitSize(radeonContextPtr radeon) { struct radeon_state_atom *atom; - int dwords = 0; + GLuint dwords = 0; /* check if we are going to emit full state */ + if (DEBUG_CMDBUF && RADEON_DEBUG & DEBUG_VERBOSE) + fprintf(stderr, "%s\n", __func__); + if (radeon->cmdbuf.cs->cdw && !radeon->hw.all_dirty) { if (!radeon->hw.is_dirty) return dwords; foreach(atom, &radeon->hw.atomlist) { - if (atom->dirty) - dwords += atom->check(radeon->glCtx, atom); + if (atom->dirty) { + const GLuint atom_size = atom->check(radeon->glCtx, atom); + dwords += atom_size; + if (DEBUG_CMDBUF && atom_size) { + radeon_print_state_atom(radeon, atom); + } + } } } else { foreach(atom, &radeon->hw.atomlist) { - dwords += atom->check(radeon->glCtx, atom); + const GLuint atom_size = atom->check(radeon->glCtx, atom); + dwords += atom_size; + if (DEBUG_CMDBUF && atom_size) { + radeon_print_state_atom(radeon, atom); + } + } } return dwords; |