summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorAaron Watry <[email protected]>2014-01-07 14:45:41 -0600
committerAaron Watry <[email protected]>2014-01-16 10:10:04 -0600
commit5ac3229f76f02453ae7e971d515b01fb56ad3fa5 (patch)
tree5a689d4423d05bd3ee52a52008353444b1764183 /src/gallium/drivers/radeon
parenta05c596a00916ce6a9c9d35ff36cd1e401fddd43 (diff)
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" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 28921beea82..07bf383f74d 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -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);
}