radeonsi: re-order debug state dumping
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 4 Aug 2017 13:42:15 +0000 (15:42 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 22 Aug 2017 07:50:57 +0000 (09:50 +0200)
Keep together the parts that won't use the deferred logging mechanism.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_debug.c

index 5a6d39102ebac4ad6a5a43d22dd7e2908e3696c5..3cc34b64bb827ee27e48b73eac544f847875c249 100644 (file)
@@ -815,9 +815,16 @@ static void si_dump_debug_state(struct pipe_context *ctx, FILE *f,
 {
        struct si_context *sctx = (struct si_context*)ctx;
 
-       if (flags & PIPE_DUMP_DEVICE_STATUS_REGISTERS)
+       if (flags & PIPE_DUMP_DEVICE_STATUS_REGISTERS) {
                si_dump_debug_registers(sctx, f);
 
+               if (flags & PIPE_DUMP_CURRENT_SHADERS) {
+                       si_dump_annotated_shaders(sctx, f);
+                       si_dump_command("Active waves (raw data)", "umr -wa | column -t", f);
+                       si_dump_command("Wave information", "umr -O bits -wa", f);
+               }
+       }
+
        if (flags & PIPE_DUMP_CURRENT_STATES)
                si_dump_framebuffer(sctx, f);
 
@@ -829,12 +836,6 @@ static void si_dump_debug_state(struct pipe_context *ctx, FILE *f,
                si_dump_gfx_shader(sctx->screen, &sctx->ps_shader, f);
                si_dump_compute_shader(sctx->screen, &sctx->cs_shader_state, f);
 
-               if (flags & PIPE_DUMP_DEVICE_STATUS_REGISTERS) {
-                       si_dump_annotated_shaders(sctx, f);
-                       si_dump_command("Active waves (raw data)", "umr -wa | column -t", f);
-                       si_dump_command("Wave information", "umr -O bits -wa", f);
-               }
-
                si_dump_descriptor_list(&sctx->descriptors[SI_DESCS_RW_BUFFERS],
                                        "", "RW buffers", 4, SI_NUM_RW_BUFFERS,
                                        si_identity, f);