summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanylo Piliaiev <[email protected]>2019-09-12 14:17:28 +0300
committerDanylo Piliaiev <[email protected]>2019-09-16 08:47:37 +0000
commit6f5a8617b40ebeca312a5cb28a5ef4375f126072 (patch)
treea00041f7cbd45845de3b5879c1c75adaec1d90a6
parentc7b2a2fd363f57bb1ab4d7d6bad786af7e2924ef (diff)
iris: Fix fence leak in iris_fence_flush
Documentation for pipe_context::flush states: "NOTE: use screen->fence_reference() (or equivalent) to transfer new fence ref to **fence, to ensure that previous fence is unref'd" Hence we need to unref previous out_fence. Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/gallium/drivers/iris/iris_fence.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_fence.c b/src/gallium/drivers/iris/iris_fence.c
index 3aaa0af2281..2225774a601 100644
--- a/src/gallium/drivers/iris/iris_fence.c
+++ b/src/gallium/drivers/iris/iris_fence.c
@@ -184,6 +184,8 @@ iris_fence_flush(struct pipe_context *ctx,
iris_syncpt_reference(screen, &fence->syncpt[fence->count++],
ice->batches[b].last_syncpt);
}
+
+ iris_fence_reference(ctx->screen, out_fence, NULL);
*out_fence = fence;
}