summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_common.c
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2009-08-27 00:08:30 +0300
committerPauli Nieminen <suokkos@gmail.com>2009-08-27 00:08:30 +0300
commit74b55970dc25d6b2a65f385fd298f141176cd4d3 (patch)
tree646306624c8db0053f0abdb2579b52db123780e8 /src/mesa/drivers/dri/radeon/radeon_common.c
parent38f56411067d51ad0de0ea73498964baaacea90b (diff)
parent47d4b9ff70c82956a77e8ea7a6abccaa0a9f9083 (diff)
Merge branch 'fix_r300_swtcl' into push_master
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_common.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index e0be15fdef..0894372fad 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -85,6 +85,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_mipmap_tree.h"
#include "radeon_queryobj.h"
+/**
+ * Enable verbose debug output for emit code.
+ * 0 no output
+ * 1 most output
+ * 2 also print state alues
+ */
#define DEBUG_CMDBUF 0
/* =============================================================
@@ -906,7 +912,7 @@ static void radeon_print_state_atom_prekmm(radeonContextPtr radeon, struct radeo
fprintf(stderr, " emit %s %d/%d\n", state->name, dwords, state->cmd_size);
- if (RADEON_DEBUG & DEBUG_VERBOSE) {
+ if (DEBUG_CMDBUF > 1 && RADEON_DEBUG & DEBUG_VERBOSE) {
if (dwords > state->cmd_size)
dwords = state->cmd_size;
@@ -943,10 +949,10 @@ static void radeon_print_state_atom(radeonContextPtr radeon, struct radeon_state
fprintf(stderr, " emit %s %d/%d\n", state->name, dwords, state->cmd_size);
- if (RADEON_DEBUG & DEBUG_VERBOSE) {
+ if (DEBUG_CMDBUF > 1 && RADEON_DEBUG & DEBUG_VERBOSE) {
if (dwords > state->cmd_size)
dwords = state->cmd_size;
- for (i = 0; i < state->cmd_size;) {
+ for (i = 0; i < dwords;) {
packet0 = state->cmd[i];
reg = (packet0 & 0x1FFF) << 2;
count = ((packet0 & 0x3FFF0000) >> 16) + 1;