On Mon, 2019-04-15 at 12:31 +0200, Lucas Stach wrote: > Am Montag, den 15.04.2019, 12:20 +0200 schrieb Philipp Zabel: > > On Fri, 2019-04-12 at 19:38 +0200, Lucas Stach wrote: > > > 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.st...@pengutronix.de> > > > --- > > > 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, > > > > Context: > > > > rsc = CALLOC_STRUCT(etna_resource); > > if (!rsc) > > > return NULL; > > > > > > rsc->base = *templat; > > This copies the content of templat into our resource base, so if > templat has the next pointer set it will also be set in our resource.
Oh, and the patch description, which I should have read more closely, even correctly points it out. Reviewed-by: Philipp Zabel <p.za...@pengutronix.de> regards Philipp _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev