[Mesa-dev] [PATCH 2/8] etnaviv: clear out next pointer when allocating resource

Christian Gmeiner christian.gmeiner at gmail.com
Fri Apr 19 08:01:41 UTC 2019


Am Fr., 12. Apr. 2019 um 19:38 Uhr schrieb Lucas Stach <l.stach at pengutronix.de>:
>
> We copy the template resource content into the newly allocated resource.
> If the template derived from a planar resource this leads to a non reference
> counted copy of the next resource pointer. Make sure to clear this out when
> allocating a new resource.
>
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>

Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>

> ---
>  src/gallium/drivers/etnaviv/etnaviv_resource.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> index 83179d3cd088..77d027ac806b 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> @@ -274,6 +274,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
>        return NULL;
>
>     rsc->base = *templat;
> +   rsc->base.next = NULL;
>     rsc->base.screen = pscreen;
>     rsc->base.nr_samples = nr_samples;
>     rsc->layout = layout;
> --
> 2.20.1
>
> _______________________________________________
> etnaviv mailing list
> etnaviv at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/etnaviv



-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info


More information about the mesa-dev mailing list