mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-05 03:40:28 +01: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>
This commit is contained in:
parent
a05c596a00
commit
5ac3229f76
2 changed files with 7 additions and 7 deletions
|
|
@ -185,13 +185,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);
|
||||
|
|
|
|||
|
|
@ -250,6 +250,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->uploader) {
|
||||
u_upload_destroy(rctx->uploader);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue