summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/spu
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-10-16 20:25:28 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-10-17 14:14:23 -0600
commit9fa8671c73fa44a95e2ea7fed6047bddb042796f (patch)
treec5b1bf1bfe68d06fc21966ec5be2dbdc0d35bed0 /src/gallium/drivers/cell/spu
parentcb8ebc912430201683463822897f06d7d42795f2 (diff)
cell: add new debug flag (cache) to report texture cache stats on exit
Diffstat (limited to 'src/gallium/drivers/cell/spu')
-rw-r--r--src/gallium/drivers/cell/spu/spu_command.c3
-rw-r--r--src/gallium/drivers/cell/spu/spu_dcache.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_command.c b/src/gallium/drivers/cell/spu/spu_command.c
index ff4a52d79a..9c853c0961 100644
--- a/src/gallium/drivers/cell/spu/spu_command.c
+++ b/src/gallium/drivers/cell/spu/spu_command.c
@@ -720,5 +720,6 @@ command_loop(void)
D_PRINTF(CELL_DEBUG_CMD, "Exit command loop\n");
- spu_dcache_report();
+ if (spu.init.debug_flags & CELL_DEBUG_CACHE)
+ spu_dcache_report();
}
diff --git a/src/gallium/drivers/cell/spu/spu_dcache.c b/src/gallium/drivers/cell/spu/spu_dcache.c
index 167404cdc5..a6d67634fd 100644
--- a/src/gallium/drivers/cell/spu/spu_dcache.c
+++ b/src/gallium/drivers/cell/spu/spu_dcache.c
@@ -36,7 +36,9 @@
#define CACHE_SET_TAGID(set) (((set) & 0x03) + TAG_DCACHE0)
#define CACHE_LOG2NNWAY 2
#define CACHE_LOG2NSETS 6
-/*#define CACHE_STATS 1*/
+#ifdef DEBUG
+#define CACHE_STATS 1
+#endif
#include <cache-api.h>
/* Yes folks, this is ugly.