Skip to content

Commit

Permalink
iris: Fix fence leak in iris_fence_flush
Browse files Browse the repository at this point in the history
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 <danylo.piliaiev@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
  • Loading branch information
Danylo Piliaiev authored and werman committed Sep 16, 2019
1 parent c7b2a2f commit 6f5a861
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gallium/drivers/iris/iris_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6f5a861

Please sign in to comment.