[Mesa-dev] [PATCH 16/25] radeonsi: show the fixed function TCS in debug dumps

Nicolai Hähnle nhaehnle at gmail.com
Thu Dec 6 14:00:37 UTC 2018


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

This is rather important for merged VS/TCS as LSHS shaders...
---
 src/gallium/drivers/radeonsi/si_debug.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c
index ec4bd03c9a5..22019741d80 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -1045,37 +1045,43 @@ static void si_dump_debug_state(struct pipe_context *ctx, FILE *f,
 		si_dump_debug_registers(sctx, f);
 
 		si_dump_annotated_shaders(sctx, f);
 		si_dump_command("Active waves (raw data)", "umr -O halt_waves -wa | column -t", f);
 		si_dump_command("Wave information", "umr -O halt_waves,bits -wa", f);
 	}
 }
 
 void si_log_draw_state(struct si_context *sctx, struct u_log_context *log)
 {
+	struct si_shader_ctx_state *tcs_shader;
+
 	if (!log)
 		return;
 
+	tcs_shader = &sctx->tcs_shader;
+	if (sctx->tes_shader.cso && !sctx->tcs_shader.cso)
+		tcs_shader = &sctx->fixed_func_tcs_shader;
+
 	si_dump_framebuffer(sctx, log);
 
 	si_dump_gfx_shader(sctx, &sctx->vs_shader, log);
-	si_dump_gfx_shader(sctx, &sctx->tcs_shader, log);
+	si_dump_gfx_shader(sctx, tcs_shader, log);
 	si_dump_gfx_shader(sctx, &sctx->tes_shader, log);
 	si_dump_gfx_shader(sctx, &sctx->gs_shader, log);
 	si_dump_gfx_shader(sctx, &sctx->ps_shader, log);
 
 	si_dump_descriptor_list(sctx->screen,
 				&sctx->descriptors[SI_DESCS_RW_BUFFERS],
 				"", "RW buffers", 4, SI_NUM_RW_BUFFERS,
 				si_identity, log);
 	si_dump_gfx_descriptors(sctx, &sctx->vs_shader, log);
-	si_dump_gfx_descriptors(sctx, &sctx->tcs_shader, log);
+	si_dump_gfx_descriptors(sctx, tcs_shader, log);
 	si_dump_gfx_descriptors(sctx, &sctx->tes_shader, log);
 	si_dump_gfx_descriptors(sctx, &sctx->gs_shader, log);
 	si_dump_gfx_descriptors(sctx, &sctx->ps_shader, log);
 }
 
 void si_log_compute_state(struct si_context *sctx, struct u_log_context *log)
 {
 	if (!log)
 		return;
 
-- 
2.19.1



More information about the mesa-dev mailing list