r300g: add new debug options for dumping scissor regs and disabling CBZB clear

This commit is contained in:
Marek Olšák 2010-09-10 09:18:03 +02:00
parent c3c5646b93
commit ab7cc44580
5 changed files with 16 additions and 3 deletions

View File

@ -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

View File

@ -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.

View File

@ -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)
/*@}*/

View File

@ -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");
}

View File

@ -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];
}