radeonsi: fix leaking the bound state on destruction v2
v2: rebased on stale pointer fixes Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
1fa2acba61
commit
58d2afa223
|
@ -102,6 +102,8 @@ static void si_destroy_context(struct pipe_context *context)
|
|||
|
||||
util_blitter_destroy(sctx->blitter);
|
||||
|
||||
si_pm4_cleanup(sctx);
|
||||
|
||||
r600_common_context_cleanup(&sctx->b);
|
||||
FREE(sctx);
|
||||
}
|
||||
|
|
|
@ -251,3 +251,10 @@ void si_pm4_reset_emitted(struct si_context *sctx)
|
|||
{
|
||||
memset(&sctx->emitted, 0, sizeof(sctx->emitted));
|
||||
}
|
||||
|
||||
void si_pm4_cleanup(struct si_context *sctx)
|
||||
{
|
||||
for (int i = 0; i < NUMBER_OF_STATES; ++i) {
|
||||
si_pm4_free_state(sctx, sctx->queued.array[i], i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,5 +91,6 @@ unsigned si_pm4_dirty_dw(struct si_context *sctx);
|
|||
void si_pm4_emit(struct si_context *sctx, struct si_pm4_state *state);
|
||||
void si_pm4_emit_dirty(struct si_context *sctx);
|
||||
void si_pm4_reset_emitted(struct si_context *sctx);
|
||||
void si_pm4_cleanup(struct si_context *sctx);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue