[Mesa-dev] [PATCH 3/4] ilo: unref old fence
Chia-I Wu
olvaffe at gmail.com
Thu Jul 9 00:04:19 PDT 2015
On Thu, Jul 9, 2015 at 8:46 AM, Rob Clark <robdclark at gmail.com> wrote:
> From: Rob Clark <robclark at freedesktop.org>
>
> Some, but not all, state trackers will explicitly unref (and set to
> NULL) the previous *fence before calling pipe->flush(). So driver
> should use fence_ref() which will unref the old fence if not NULL.
Looks good. Thanks.
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
> src/gallium/drivers/ilo/ilo_context.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/gallium/drivers/ilo/ilo_context.c b/src/gallium/drivers/ilo/ilo_context.c
> index 3d5c7b6..b9a16aa 100644
> --- a/src/gallium/drivers/ilo/ilo_context.c
> +++ b/src/gallium/drivers/ilo/ilo_context.c
> @@ -62,6 +62,8 @@ ilo_flush(struct pipe_context *pipe,
> (flags & PIPE_FLUSH_END_OF_FRAME) ? "frame end" : "user request");
>
> if (f) {
> + struct pipe_screen *screen = pipe->screen;
> + screen->fence_reference(screen, f, NULL);
> *f = ilo_screen_fence_create(pipe->screen, ilo->cp->last_submitted_bo);
> }
> }
> --
> 2.4.3
>
--
olv at LunarG.com
More information about the mesa-dev
mailing list