This will be used by the IB parser.
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
/* force to keep tiling flags */
flags |= RADEON_FLUSH_KEEP_TILING_FLAGS;
+ /* Save the IB for debug contexts. */
+ if (ctx->is_debug) {
+ free(ctx->last_ib);
+ ctx->last_ib_dw_size = cs->cdw;
+ ctx->last_ib = malloc(cs->cdw * 4);
+ memcpy(ctx->last_ib, cs->buf, cs->cdw * 4);
+ }
+
/* Flush the CS. */
ws->cs_flush(cs, flags, &ctx->last_gfx_fence,
ctx->screen->b.cs_count++);
LLVMDisposeTargetMachine(sctx->tm);
#endif
+ free(sctx->last_ib);
FREE(sctx);
}
sctx->b.b.destroy = si_destroy_context;
sctx->b.set_atom_dirty = (void *)si_set_atom_dirty;
sctx->screen = sscreen; /* Easy accessing of screen/winsys. */
+ sctx->is_debug = (flags & PIPE_CONTEXT_DEBUG) != 0;
if (!r600_common_context_init(&sctx->b, &sscreen->b))
goto fail;
struct si_shader_selector *last_tcs;
int last_num_tcs_input_cp;
int last_tes_sh_base;
+
+ /* Debug state. */
+ bool is_debug;
+ uint32_t *last_ib;
+ unsigned last_ib_dw_size;
};
/* cik_sdma.c */