[Mesa-dev] [PATCH] nvc0: unreference images when the context is destroyed

Ilia Mirkin imirkin at alum.mit.edu
Fri May 6 13:11:53 UTC 2016


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On May 6, 2016 9:09 AM, "Samuel Pitoiset" <samuel.pitoiset at gmail.com> wrote:

> Like other resources, we need to unreference all images.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
> b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
> index f6c58f2..428b33d 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
> @@ -161,6 +161,10 @@ nvc0_context_unreference_resources(struct
> nvc0_context *nvc0)
>        for (i = 0; i < NVC0_MAX_BUFFERS; ++i)
>           pipe_resource_reference(&nvc0->buffers[s][i].buffer, NULL);
>
> +   for (s = 0; s < 6; ++s)
> +      for (i = 0; i < NVC0_MAX_IMAGES; ++i)
> +         pipe_resource_reference(&nvc0->images[s][i].resource, NULL);
> +
>     for (i = 0; i < nvc0->num_tfbbufs; ++i)
>        pipe_so_target_reference(&nvc0->tfbbuf[i], NULL);
>
> --
> 2.8.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160506/cfe9d2b4/attachment.html>


More information about the mesa-dev mailing list