[Mesa-dev] [PATCH 17/25] radeonsi: avoid using hard-coded SI_NUM_RW_BUFFERS

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


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

---
 src/gallium/drivers/radeonsi/si_debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c
index 22019741d80..fe2970a0ea3 100644
--- a/src/gallium/drivers/radeonsi/si_debug.c
+++ b/src/gallium/drivers/radeonsi/si_debug.c
@@ -1064,21 +1064,22 @@ void si_log_draw_state(struct si_context *sctx, struct u_log_context *log)
 	si_dump_framebuffer(sctx, log);
 
 	si_dump_gfx_shader(sctx, &sctx->vs_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,
+				"", "RW buffers", 4,
+				sctx->descriptors[SI_DESCS_RW_BUFFERS].num_active_slots,
 				si_identity, log);
 	si_dump_gfx_descriptors(sctx, &sctx->vs_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)
 {
-- 
2.19.1



More information about the mesa-dev mailing list