[Mesa-dev] [PATCH 1/4] gallium: clarify reference counting for fence
Marek Olšák
maraeo at gmail.com
Fri Jul 10 04:09:15 PDT 2015
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Jul 8, 2015 at 10:34 PM, Rob Clark <robdclark at gmail.com> wrote:
> From: Rob Clark <robclark at freedesktop.org>
>
> No where was it spelled out that the state tracker may expect the pipe
> driver to unref the old fence.
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
> src/gallium/include/pipe/p_context.h | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
> index c2eedf8..d2c2e4c 100644
> --- a/src/gallium/include/pipe/p_context.h
> +++ b/src/gallium/include/pipe/p_context.h
> @@ -361,8 +361,14 @@ struct pipe_context {
> const void *clear_value,
> int clear_value_size);
>
> - /** Flush draw commands
> + /**
> + * Flush draw commands
> + *
> + * NOTE: use screen->fence_reference() (or equivalent) to transfer
> + * new fence ref to **fence, to ensure that previous fence is unref'd
> *
> + * \param fence if not NULL, an old fence to unref and transfer a
> + * new fence reference to
> * \param flags bitfield of enum pipe_flush_flags values.
> */
> void (*flush)(struct pipe_context *pipe,
> --
> 2.4.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list