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

Roland Scheidegger sroland at vmware.com
Wed Jan 9 16:58:47 UTC 2019


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.

Roland


> 
> Marek



More information about the mesa-dev mailing list