summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-05-03 19:05:03 +0200
committerMarek Olšák <maraeo@gmail.com>2010-05-03 19:29:32 +0200
commit0bcb4f10016fb611b2946307d880f4dc1dd05eae (patch)
treef07e8fa94a230c11402bf2d4f0945cf6c04233d7 /src
parent15af543f106db9e6ff840828905df4978e68f715 (diff)
r300g: improve texture debug output, split into TEX and TEXALLOC flags
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_debug.c1
-rw-r--r--src/gallium/drivers/r300/r300_screen.h1
-rw-r--r--src/gallium/drivers/r300/r300_texture.c26
3 files changed, 22 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c
index 4c2836f36a..8eb321fa08 100644
--- a/src/gallium/drivers/r300/r300_debug.c
+++ b/src/gallium/drivers/r300/r300_debug.c
@@ -37,6 +37,7 @@ static struct debug_option debug_options[] = {
{ "cs", DBG_CS, "Command submissions (for debugging)" },
{ "draw", DBG_DRAW, "Draw and emit (for debugging)" },
{ "tex", DBG_TEX, "Textures (for debugging)" },
+ { "texalloc", DBG_TEXALLOC, "Texture allocation (for debugging)" },
{ "fall", DBG_FALL, "Fallbacks (for debugging)" },
{ "rs", DBG_RS, "Rasterizer (for debugging)" },
{ "anisohq", DBG_ANISOHQ, "High quality anisotropic filtering (for benchmarking)" },
diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h
index 735c233c9e..d58aa138a7 100644
--- a/src/gallium/drivers/r300/r300_screen.h
+++ b/src/gallium/drivers/r300/r300_screen.h
@@ -73,6 +73,7 @@ static INLINE struct r300_screen* r300_screen(struct pipe_screen* screen) {
#define DBG_NO_IMMD 0x0000200
#define DBG_STATS 0x0000400
#define DBG_RS 0x0000800
+#define DBG_TEXALLOC 0x0001000
/*@}*/
static INLINE boolean SCREEN_DBG_ON(struct r300_screen * screen, unsigned flags)
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 69e6a12445..3e3cf33bde 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -585,9 +585,6 @@ static void r300_texture_setup_immutable_state(struct r300_screen* screen,
f->tile_config = R300_TXO_MACRO_TILE(tex->macrotile) |
R300_TXO_MICRO_TILE(tex->microtile);
-
- SCREEN_DBG(screen, DBG_TEX, "r300: Set texture state (%dx%d, %d levels)\n",
- pt->width0, pt->height0, pt->last_level);
}
static void r300_texture_setup_fb_state(struct r300_screen* screen,
@@ -622,7 +619,7 @@ void r300_texture_reinterpret_format(struct pipe_screen *screen,
{
struct r300_screen *r300screen = r300_screen(screen);
- SCREEN_DBG(r300screen, DBG_TEX, "r300: Reinterpreting format: %s -> %s\n",
+ SCREEN_DBG(r300screen, DBG_TEX, "r300: texture_reinterpret_format: %s -> %s\n",
util_format_name(tex->format), util_format_name(new_format));
tex->format = new_format;
@@ -774,7 +771,7 @@ static void r300_setup_miptree(struct r300_screen* screen,
unsigned stride, size, layer_size, nblocksy, i;
boolean rv350_mode = screen->caps.is_rv350;
- SCREEN_DBG(screen, DBG_TEX, "r300: Making miptree for texture, format %s\n",
+ SCREEN_DBG(screen, DBG_TEXALLOC, "r300: Making miptree for texture, format %s\n",
util_format_name(base->format));
for (i = 0; i <= base->last_level; i++) {
@@ -801,7 +798,7 @@ static void r300_setup_miptree(struct r300_screen* screen,
tex->hwpitch[i] =
tex->pitch[i] * util_format_get_blockwidth(base->format);
- SCREEN_DBG(screen, DBG_TEX, "r300: Texture miptree: Level %d "
+ SCREEN_DBG(screen, DBG_TEXALLOC, "r300: Texture miptree: Level %d "
"(%dx%dx%d px, pitch %d bytes) %d bytes total, macrotiled %s\n",
i, u_minify(base->width0, i), u_minify(base->height0, i),
u_minify(base->depth0, i), stride, tex->size,
@@ -942,6 +939,15 @@ struct pipe_resource* r300_texture_create(struct pipe_screen* screen,
r300_texture_setup_immutable_state(rscreen, tex);
r300_texture_setup_fb_state(rscreen, tex);
+ SCREEN_DBG(rscreen, DBG_TEX,
+ "r300: texture_create: Macro: %s, Micro: %s, Pitch: %i, "
+ "Dim: %ix%ix%i, LastLevel: %i, Format: %s\n",
+ tex->macrotile ? "YES" : " NO",
+ tex->microtile ? "YES" : " NO",
+ tex->hwpitch[0],
+ base->width0, base->height0, base->depth0, base->last_level,
+ util_format_name(base->format));
+
tex->buffer = rws->buffer_create(rws, 2048,
PIPE_BIND_SAMPLER_VIEW, /* XXX */
tex->size);
@@ -1039,6 +1045,14 @@ r300_texture_from_handle(struct pipe_screen* screen,
rws->buffer_get_tiling(rws, buffer, &tex->microtile, &tex->macrotile);
r300_setup_flags(tex);
+ SCREEN_DBG(rscreen, DBG_TEX,
+ "r300: texture_from_handle: Macro: %s, Micro: %s, "
+ "Pitch: % 4i, Dim: %ix%i, Format: %s\n",
+ tex->macrotile ? "YES" : " NO",
+ tex->microtile ? "YES" : " NO",
+ stride / util_format_get_blocksize(base->format),
+ base->width0, base->height0,
+ util_format_name(base->format));
/* Enforce microtiled zbuffer. */
override_zb_flags = util_format_is_depth_or_stencil(base->format) &&