r300,r600,radeonsi: inline struct radeon_cmdbuf to remove dereferences
It's straightforward except that the amdgpu winsys had to be cleaned up to allow this. radeon_cmdbuf is inlined and optionally the winsys can save the pointer to it. radeon_cmdbuf::priv points to the winsys cs structure. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7907>
This commit is contained in:
@@ -424,20 +424,20 @@ static void si_log_chunk_type_cs_print(void *data, FILE *f)
|
||||
ac_parse_ib(f, scs->gfx.ib + chunk->gfx_begin, chunk->gfx_end - chunk->gfx_begin,
|
||||
&last_trace_id, map ? 1 : 0, "IB", ctx->chip_class, NULL, NULL);
|
||||
} else {
|
||||
si_parse_current_ib(f, ctx->gfx_cs, chunk->gfx_begin, chunk->gfx_end, &last_trace_id,
|
||||
si_parse_current_ib(f, &ctx->gfx_cs, chunk->gfx_begin, chunk->gfx_end, &last_trace_id,
|
||||
map ? 1 : 0, "IB", ctx->chip_class);
|
||||
}
|
||||
}
|
||||
|
||||
if (chunk->compute_end != chunk->compute_begin) {
|
||||
assert(ctx->prim_discard_compute_cs);
|
||||
assert(ctx->prim_discard_compute_cs.priv);
|
||||
|
||||
if (scs->flushed) {
|
||||
ac_parse_ib(f, scs->compute.ib + chunk->compute_begin,
|
||||
chunk->compute_end - chunk->compute_begin, &last_compute_trace_id, map ? 1 : 0,
|
||||
"Compute IB", ctx->chip_class, NULL, NULL);
|
||||
} else {
|
||||
si_parse_current_ib(f, ctx->prim_discard_compute_cs, chunk->compute_begin,
|
||||
si_parse_current_ib(f, &ctx->prim_discard_compute_cs, chunk->compute_begin,
|
||||
chunk->compute_end, &last_compute_trace_id, map ? 1 : 0, "Compute IB",
|
||||
ctx->chip_class);
|
||||
}
|
||||
@@ -461,12 +461,12 @@ static void si_log_cs(struct si_context *ctx, struct u_log_context *log, bool du
|
||||
assert(ctx->current_saved_cs);
|
||||
|
||||
struct si_saved_cs *scs = ctx->current_saved_cs;
|
||||
unsigned gfx_cur = ctx->gfx_cs->prev_dw + ctx->gfx_cs->current.cdw;
|
||||
unsigned gfx_cur = ctx->gfx_cs.prev_dw + ctx->gfx_cs.current.cdw;
|
||||
unsigned compute_cur = 0;
|
||||
|
||||
if (ctx->prim_discard_compute_cs)
|
||||
if (ctx->prim_discard_compute_cs.priv)
|
||||
compute_cur =
|
||||
ctx->prim_discard_compute_cs->prev_dw + ctx->prim_discard_compute_cs->current.cdw;
|
||||
ctx->prim_discard_compute_cs.prev_dw + ctx->prim_discard_compute_cs.current.cdw;
|
||||
|
||||
if (!dump_bo_list && gfx_cur == scs->gfx_last_dw && compute_cur == scs->compute_last_dw)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user