mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
radeon: Move gfx/dma cs cleanup to r600_common_context_cleanup
The radeonsi code was not cleaning up either of these items leading to
leaked memory.
v2: Move cleanup to r600_common_context_cleanup instead of duplicating
the logic for SI
CC: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 5ac3229f76)
Conflicts:
src/gallium/drivers/radeon/r600_pipe_common.c
This commit is contained in:
parent
0fd4cf4bf8
commit
0ec1ae90ef
2 changed files with 7 additions and 7 deletions
|
|
@ -192,13 +192,6 @@ static void r600_destroy_context(struct pipe_context *context)
|
|||
|
||||
r600_release_command_buffer(&rctx->start_cs_cmd);
|
||||
|
||||
if (rctx->b.rings.gfx.cs) {
|
||||
rctx->b.ws->cs_destroy(rctx->b.rings.gfx.cs);
|
||||
}
|
||||
if (rctx->b.rings.dma.cs) {
|
||||
rctx->b.ws->cs_destroy(rctx->b.rings.dma.cs);
|
||||
}
|
||||
|
||||
FREE(rctx->start_compute_cs_cmd.buf);
|
||||
|
||||
r600_common_context_cleanup(&rctx->b);
|
||||
|
|
|
|||
|
|
@ -234,6 +234,13 @@ bool r600_common_context_init(struct r600_common_context *rctx,
|
|||
|
||||
void r600_common_context_cleanup(struct r600_common_context *rctx)
|
||||
{
|
||||
if (rctx->rings.gfx.cs) {
|
||||
rctx->ws->cs_destroy(rctx->rings.gfx.cs);
|
||||
}
|
||||
if (rctx->rings.dma.cs) {
|
||||
rctx->ws->cs_destroy(rctx->rings.dma.cs);
|
||||
}
|
||||
|
||||
if (rctx->allocator_so_filled_size) {
|
||||
u_suballocator_destroy(rctx->allocator_so_filled_size);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue