Module: Mesa
Branch: master
Commit: 4ed419328d62b428207dbcc53cdf45b0d29f5962
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ed419328d62b428207dbcc53cdf45b0d29f5962

Author: Nicolai Hähnle <[email protected]>
Date:   Sat Sep 23 22:34:10 2017 +0200

radeonsi: move descriptor logs to after corresponding draw/compute packet

It has to happen after descriptor uploads since otherwise we'll print out
the wrong GPU list / incorrectly claim descriptor corruption.

Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>

---

 src/gallium/drivers/radeonsi/si_compute.c    | 7 +++----
 src/gallium/drivers/radeonsi/si_state_draw.c | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_compute.c 
b/src/gallium/drivers/radeonsi/si_compute.c
index 3987eecca8..0a9d4f787d 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -806,9 +806,6 @@ static void si_launch_grid(
 
        si_need_cs_space(sctx);
 
-       if (sctx->b.log)
-               si_log_compute_state(sctx, sctx->b.log);
-
        if (!sctx->cs_shader_state.initialized)
                si_initialize_compute(sctx);
 
@@ -851,8 +848,10 @@ static void si_launch_grid(
 
        si_emit_dispatch_packets(sctx, info);
 
-       if (unlikely(sctx->current_saved_cs))
+       if (unlikely(sctx->current_saved_cs)) {
                si_trace_emit(sctx);
+               si_log_compute_state(sctx, sctx->b.log);
+       }
 
        sctx->compute_is_busy = true;
        sctx->b.num_compute_calls++;
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c 
b/src/gallium/drivers/radeonsi/si_state_draw.c
index 897c86b054..0a672c503f 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -1376,9 +1376,6 @@ void si_draw_vbo(struct pipe_context *ctx, const struct 
pipe_draw_info *info)
 
        si_need_cs_space(sctx);
 
-       if (unlikely(sctx->b.log))
-               si_log_draw_state(sctx, sctx->b.log);
-
        /* Since we've called r600_context_add_resource_size for vertex buffers,
         * this must be called after si_need_cs_space, because we must let
         * need_cs_space flush before we add buffers to the buffer list.
@@ -1454,8 +1451,10 @@ void si_draw_vbo(struct pipe_context *ctx, const struct 
pipe_draw_info *info)
                si_emit_draw_packets(sctx, info, indexbuf, index_size, 
index_offset);
        }
 
-       if (unlikely(sctx->current_saved_cs))
+       if (unlikely(sctx->current_saved_cs)) {
                si_trace_emit(sctx);
+               si_log_draw_state(sctx, sctx->b.log);
+       }
 
        /* Workaround for a VGT hang when streamout is enabled.
         * It must be done after drawing. */

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to