Mesa (master): r300g: add new debug options for dumping scissor regs and disabling CBZB clear
Marek Olšák
mareko at kemper.freedesktop.org
Mon Sep 13 05:53:59 UTC 2010
Module: Mesa
Branch: master
Commit: ab7cc445801b99a4482ea50429ceea1d0601a221
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab7cc445801b99a4482ea50429ceea1d0601a221
Author: Marek Olšák <maraeo at gmail.com>
Date: Fri Sep 10 09:18:03 2010 +0200
r300g: add new debug options for dumping scissor regs and disabling CBZB clear
---
src/gallium/drivers/r300/r300_debug.c | 4 +++-
src/gallium/drivers/r300/r300_emit.c | 4 ++++
src/gallium/drivers/r300/r300_screen.h | 4 +++-
src/gallium/drivers/r300/r300_texture.c | 4 +++-
src/gallium/drivers/r300/r300_texture_desc.c | 3 +++
5 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c
index 786fdf6..145a798 100644
--- a/src/gallium/drivers/r300/r300_debug.c
+++ b/src/gallium/drivers/r300/r300_debug.c
@@ -28,7 +28,7 @@
static const struct debug_named_value debug_options[] = {
{ "fp", DBG_FP, "Log fragment program compilation" },
- { "vp", DBG_VP, "Log bertex program compilation" },
+ { "vp", DBG_VP, "Log vertex program compilation" },
{ "draw", DBG_DRAW, "Log draw calls" },
{ "swtcl", DBG_SWTCL, "Log SWTCL-specific info" },
{ "rsblock", DBG_RS_BLOCK, "Log rasterizer registers" },
@@ -41,11 +41,13 @@ static const struct debug_named_value debug_options[] = {
{ "cbzb", DBG_CBZB, "Log fast color clear info" },
{ "stats", DBG_STATS, "Log emission statistics" },
{ "hyperz", DBG_HYPERZ, "Log HyperZ info" },
+ { "scissor", DBG_SCISSOR, "Log scissor info" },
{ "fakeocc", DBG_FAKE_OCC, "Use fake occlusion queries" },
{ "anisohq", DBG_ANISOHQ, "Use high quality anisotropic filtering" },
{ "notiling", DBG_NO_TILING, "Disable tiling" },
{ "noimmd", DBG_NO_IMMD, "Disable immediate mode" },
{ "noopt", DBG_NO_OPT, "Disable shader optimizations" },
+ { "nocbzb", DBG_NO_CBZB, "Disable fast color clear" },
/* must be last */
DEBUG_NAMED_VALUE_END
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 2583b93..3eebd2a 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -300,6 +300,10 @@ void r300_emit_gpu_flush(struct r300_context *r300, unsigned size, void *state)
width = surf->cbzb_width;
}
+ DBG(r300, DBG_SCISSOR,
+ "r300: Scissor width: %i, height: %i, CBZB clear: %s\n",
+ width, height, r300->cbzb_clear ? "YES" : "NO");
+
BEGIN_CS(size);
/* Set up scissors.
diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h
index f2f6321..dc2bc7e 100644
--- a/src/gallium/drivers/r300/r300_screen.h
+++ b/src/gallium/drivers/r300/r300_screen.h
@@ -92,12 +92,14 @@ r300_winsys_screen(struct pipe_screen *screen) {
#define DBG_RS_BLOCK (1 << 10)
#define DBG_CBZB (1 << 11)
#define DBG_HYPERZ (1 << 12)
+#define DBG_SCISSOR (1 << 13)
/* Features. */
#define DBG_ANISOHQ (1 << 16)
#define DBG_NO_TILING (1 << 17)
#define DBG_NO_IMMD (1 << 18)
#define DBG_FAKE_OCC (1 << 19)
-#define DBG_NO_OPT (1 << 20)
+#define DBG_NO_OPT (1 << 20)
+#define DBG_NO_CBZB (1 << 21)
/* Statistics. */
#define DBG_STATS (1 << 24)
/*@}*/
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index dae5f2a..34105aa 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -881,9 +881,11 @@ struct pipe_surface* r300_get_tex_surface(struct pipe_screen* screen,
surface->cbzb_format = R300_DEPTHFORMAT_16BIT_INT_Z;
SCREEN_DBG(r300_screen(screen), DBG_CBZB,
- "CBZB Dim: %ix%i, Misalignment: %i, Macro: %s\n",
+ "CBZB Allowed: %s, Dim: %ix%i, Misalignment: %i, Micro: %s, Macro: %s\n",
+ surface->cbzb_allowed ? "YES" : " NO",
surface->cbzb_width, surface->cbzb_height,
offset & 2047,
+ tex->desc.microtile ? "YES" : " NO",
tex->desc.macrotile[level] ? "YES" : " NO");
}
diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c
index 2fe5d72..112282a 100644
--- a/src/gallium/drivers/r300/r300_texture_desc.c
+++ b/src/gallium/drivers/r300/r300_texture_desc.c
@@ -339,6 +339,9 @@ static void r300_setup_cbzb_flags(struct r300_screen *rscreen,
(bpp == 16 || bpp == 32) &&
desc->macrotile[0];
+ if (SCREEN_DBG_ON(rscreen, DBG_NO_CBZB))
+ first_level_valid = FALSE;
+
for (i = 0; i <= desc->b.b.last_level; i++)
desc->cbzb_allowed[i] = first_level_valid && desc->macrotile[i];
}
More information about the mesa-commit
mailing list