summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-11-23 13:30:23 +0100
committerMarek Olšák <[email protected]>2015-12-03 23:41:23 +0100
commit3a6de8c86ee8a0a6d2f2fbc8cf2c461af0b9a007 (patch)
treeda87397763d7e466c554b15f92c1b5f67fde95ea /src
parenta0bfb2798d243a4685d6ea32e9a7091fcec74700 (diff)
radeonsi: print framebuffer info into ddebug logs
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h1
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c3
-rw-r--r--src/gallium/drivers/radeonsi/si_debug.c25
3 files changed, 27 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index cd2dd09d752..8c6c0c37e50 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -558,6 +558,7 @@ void r600_texture_get_cmask_info(struct r600_common_screen *rscreen,
bool r600_init_flushed_depth_texture(struct pipe_context *ctx,
struct pipe_resource *texture,
struct r600_texture **staging);
+void r600_print_texture_info(struct r600_texture *rtex, FILE *f);
struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
const struct pipe_resource *templ);
struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe,
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index bf0358bff12..e2947d9e351 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -598,8 +598,7 @@ static void r600_texture_allocate_htile(struct r600_common_screen *rscreen,
}
}
-static void
-r600_print_texture_info(struct r600_texture *rtex, FILE *f)
+void r600_print_texture_info(struct r600_texture *rtex, FILE *f)
{
int i;
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c
index 53062187b88..b2b10109233 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -528,6 +528,30 @@ static void si_dump_last_bo_list(struct si_context *sctx, FILE *f)
sctx->last_bo_list = NULL;
}
+static void si_dump_framebuffer(struct si_context *sctx, FILE *f)
+{
+ struct pipe_framebuffer_state *state = &sctx->framebuffer.state;
+ struct r600_texture *rtex;
+ int i;
+
+ for (i = 0; i < state->nr_cbufs; i++) {
+ if (!state->cbufs[i])
+ continue;
+
+ rtex = (struct r600_texture*)state->cbufs[i]->texture;
+ fprintf(f, COLOR_YELLOW "Color buffer %i:" COLOR_RESET "\n", i);
+ r600_print_texture_info(rtex, f);
+ fprintf(f, "\n");
+ }
+
+ if (state->zsbuf) {
+ rtex = (struct r600_texture*)state->zsbuf->texture;
+ fprintf(f, COLOR_YELLOW "Depth-stencil buffer:" COLOR_RESET "\n");
+ r600_print_texture_info(rtex, f);
+ fprintf(f, "\n");
+ }
+}
+
static void si_dump_debug_state(struct pipe_context *ctx, FILE *f,
unsigned flags)
{
@@ -536,6 +560,7 @@ static void si_dump_debug_state(struct pipe_context *ctx, FILE *f,
if (flags & PIPE_DEBUG_DEVICE_IS_HUNG)
si_dump_debug_registers(sctx, f);
+ si_dump_framebuffer(sctx, f);
si_dump_shader(&sctx->vs_shader, "Vertex", f);
si_dump_shader(&sctx->tcs_shader, "Tessellation control", f);
si_dump_shader(&sctx->tes_shader, "Tessellation evaluation", f);