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>
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);
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);
}