Some of it is left there and it will be re-used in the next commit.
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
/* Count in framebuffer cache flushes at the end of CS. */
num_dw += ctx->atoms.s.cache_flush->num_dw;
-#if SI_TRACE_CS
- if (ctx->screen->b.trace_bo) {
+ if (ctx->screen->b.trace_bo)
num_dw += SI_TRACE_CS_DWORDS;
- }
-#endif
/* Flush if there's not enough space. */
if (num_dw > cs->max_dw) {
if (fence)
ws->fence_reference(fence, ctx->last_gfx_fence);
-#if SI_TRACE_CS
- if (ctx->screen->b.trace_bo) {
- struct si_screen *sscreen = ctx->screen;
- unsigned i;
-
- for (i = 0; i < 10; i++) {
- usleep(5);
- if (!ws->buffer_is_busy(sscreen->b.trace_bo->buf, RADEON_USAGE_READWRITE)) {
- break;
- }
- }
- if (i == 10) {
- fprintf(stderr, "timeout on cs lockup likely happen at cs %d dw %d\n",
- sscreen->b.trace_ptr[1], sscreen->b.trace_ptr[0]);
- } else {
- fprintf(stderr, "cs %d executed in %dms\n", sscreen->b.trace_ptr[1], i * 5);
- }
- }
-#endif
-
si_begin_new_cs(ctx);
}
#define SI_RESTART_INDEX_UNKNOWN INT_MIN
#define SI_NUM_SMOOTH_AA_SAMPLES 8
-#define SI_TRACE_CS 0
#define SI_TRACE_CS_DWORDS 6
#define SI_MAX_DRAW_CS_DWORDS \
void si_begin_new_cs(struct si_context *ctx);
void si_need_cs_space(struct si_context *ctx, unsigned num_dw, boolean count_draw_in);
-#if SI_TRACE_CS
-void si_trace_emit(struct si_context *sctx);
-#endif
-
/* si_compute.c */
void si_init_compute_functions(struct si_context *sctx);
continue;
count += state->ndw;
-#if SI_TRACE_CS
- /* for tracing each states */
- if (sctx->screen->b.trace_bo) {
- count += SI_TRACE_CS_DWORDS;
- }
-#endif
}
return count;
}
cs->cdw += state->ndw;
-
-#if SI_TRACE_CS
- if (sctx->screen->b.trace_bo) {
- si_trace_emit(sctx);
- }
-#endif
}
void si_pm4_emit_dirty(struct si_context *sctx)
extern const struct r600_atom si_atom_msaa_config;
void si_emit_cache_flush(struct r600_common_context *sctx, struct r600_atom *atom);
void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo);
+void si_trace_emit(struct si_context *sctx);
/* si_commands.c */
void si_cmd_context_control(struct si_pm4_state *pm4);
si_emit_draw_registers(sctx, info);
si_emit_draw_packets(sctx, info, &ib);
-#if SI_TRACE_CS
- if (sctx->screen->b.trace_bo) {
+ if (sctx->screen->b.trace_bo)
si_trace_emit(sctx);
- }
-#endif
/* Workaround for a VGT hang when streamout is enabled.
* It must be done after drawing. */
sctx->b.num_draw_calls++;
}
-#if SI_TRACE_CS
void si_trace_emit(struct si_context *sctx)
{
struct si_screen *sscreen = sctx->screen;
radeon_emit(cs, cs->cdw);
radeon_emit(cs, sscreen->b.cs_count);
}
-#endif