aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2015-12-16 22:44:17 +0100
committerSamuel Pitoiset <[email protected]>2015-12-16 23:03:08 +0100
commitaeee7f2a4dc7ceddace91ef5e91790483f4597e0 (patch)
tree4a38c4b43dfbe10505da0260bb8364f8bbfb6e2b /src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c
parent9aca60bfb07d87d82aff943a23cfa693e2712528 (diff)
nv50,nvc0: free memory allocated by performance metrics
The destroy_query() helper was actually never called. This fixes a memory leak while monitoring performance metrics. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Ilia Mirkin <[email protected]> Cc: "11.1" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c
index 8453ce76095..79c7023b2d4 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c
@@ -153,7 +153,9 @@ static void
nv50_hw_sm_destroy_query(struct nv50_context *nv50, struct nv50_hw_query *hq)
{
struct nv50_query *q = &hq->base;
- q->funcs->destroy_query(nv50, q);
+ nv50_hw_query_allocate(nv50, q, 0);
+ nouveau_fence_ref(NULL, &hq->fence);
+ FREE(hq);
}
static boolean