diff options
author | Marek Olšák <[email protected]> | 2010-09-10 09:18:03 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-09-13 07:49:43 +0200 |
commit | ab7cc445801b99a4482ea50429ceea1d0601a221 (patch) | |
tree | 0c869af913208ef5188fe669a391d85d381235a4 /src | |
parent | c3c5646b93eb20013d2739c7966da7ddad532877 (diff) |
r300g: add new debug options for dumping scissor regs and disabling CBZB clear
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r300/r300_debug.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 4 | ||||
-rw-r--r-- | 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 786fdf6ce8d..145a7985da3 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 2583b93c484..3eebd2a9be6 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 f2f63213e0d..dc2bc7e8279 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 dae5f2aedf9..34105aa4bcd 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 2fe5d721881..112282a0a6a 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]; } |