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);
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++;
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.
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. */