[Mesa-dev] [PATCH] st/mesa: don't leak pipe_surface if pipe_context is not current

Marek Olšák maraeo at gmail.com
Wed Jan 9 23:42:34 UTC 2019


On Wed, Jan 9, 2019 at 11:58 AM Roland Scheidegger <sroland at vmware.com>
wrote:

> Am 08.01.19 um 21:03 schrieb Marek Olšák:
> > On Tue, Jan 8, 2019 at 12:54 PM Roland Scheidegger <sroland at vmware.com
> > <mailto:sroland at vmware.com>> wrote:
> >
> >     Am 08.01.19 um 17:17 schrieb Marek Olšák:
> >     > From: Marek Olšák <marek.olsak at amd.com <mailto:marek.olsak at amd.com
> >>
> >     >
> >     > We have found some pipe_surface leaks internally.
> >     >
> >     > This is the same code as surface_destroy in radeonsi.
> >     > Ideally, surface_destroy would be in pipe_screen.
> >     > No, pipe_surfaces are not context objects.
> >     Well they are supposed to be...
> >     But yes mesa/st doesn't play by the rules there, so I guess that's
> >     better than a leak...
> >
> >
> > If it was possible, I would change the rules. create_surface could stay
> > in pipe_context, but I would move surface_destroy into pipe_screen.
>
> I think st/mesa would still use (not just delete) the pipe_surface in
> other contexts? If so I don't like the proposal, because it's still a
> lie that pipe_surface is a context-based object.
>

>From the perspective of u_threaded_context, it's already a screen object.
(create_surface can be called from any thread and isn't allowed to interact
with the context)

Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190109/8f66670c/attachment-0001.html>


More information about the mesa-dev mailing list