summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_pc.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-08-31 13:17:07 +0200
committerChristoph Bumiller <[email protected]>2010-09-01 18:02:50 +0200
commitd90502b2b468732e2a42985580bbbe9d9fdfd14e (patch)
tree05577128b9731570382f054c846d5b231061a817 /src/gallium/drivers/nv50/nv50_pc.c
parent3844c365947082550565accefd996c10fbb15cc4 (diff)
nv50: turn off verbose debug output by default
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_pc.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_pc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc.c b/src/gallium/drivers/nv50/nv50_pc.c
index b9d274414d1..1c12fe1b9e7 100644
--- a/src/gallium/drivers/nv50/nv50_pc.c
+++ b/src/gallium/drivers/nv50/nv50_pc.c
@@ -20,6 +20,8 @@
* SOFTWARE.
*/
+/* #define NV50PC_DEBUG */
+
#include "nv50_pc.h"
#include "nv50_program.h"
@@ -311,7 +313,7 @@ nv50_emit_program(struct nv_pc *pc)
uint32_t *code = pc->emit;
int n;
- debug_printf("emitting program: size = %u\n", pc->bin_size);
+ NV50_DBGMSG("emitting program: size = %u\n", pc->bin_size);
for (n = 0; n < pc->num_blocks; ++n) {
struct nv_instruction *i;
@@ -336,7 +338,9 @@ nv50_emit_program(struct nv_pc *pc)
pc->emit = code;
code[pc->bin_size / 4 - 1] |= 1;
+#ifdef NV50PC_DEBUG
nvcg_show_bincode(pc);
+#endif
return 0;
}
@@ -354,7 +358,9 @@ nv50_generate_code(struct nv50_translation_info *ti)
ret = nv50_tgsi_to_nc(pc, ti);
if (ret)
goto out;
+#ifdef NV50PC_DEBUG
nv_print_program(pc->root);
+#endif
/* optimization */
ret = nv_pc_exec_pass0(pc);
@@ -392,7 +398,7 @@ nv50_generate_code(struct nv50_translation_info *ti)
ti->p->fixups = pc->fixups;
ti->p->num_fixups = pc->num_fixups;
- debug_printf("SHADER TRANSLATION - %s\n", ret ? "failure" : "success");
+ NV50_DBGMSG("SHADER TRANSLATION - %s\n", ret ? "failure" : "success");
out:
nv_pc_free_refs(pc);
@@ -492,7 +498,7 @@ nv_nvi_delete(struct nv_instruction *nvi)
if (nvi == b->phi) {
if (nvi->opcode != NV_OP_PHI)
- debug_printf("NOTE: b->phi points to non-PHI instruction\n");
+ NV50_DBGMSG("NOTE: b->phi points to non-PHI instruction\n");
assert(!nvi->prev);
if (!nvi->next || nvi->next->opcode != NV_OP_PHI)