<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Jan 9, 2019 at 11:58 AM Roland Scheidegger <<a href="mailto:sroland@vmware.com" target="_blank">sroland@vmware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am 08.01.19 um 21:03 schrieb Marek Olšák:<br>
> On Tue, Jan 8, 2019 at 12:54 PM Roland Scheidegger <<a href="mailto:sroland@vmware.com" target="_blank">sroland@vmware.com</a><br>
> <mailto:<a href="mailto:sroland@vmware.com" target="_blank">sroland@vmware.com</a>>> wrote:<br>
> <br>
>     Am 08.01.19 um 17:17 schrieb Marek Olšák:<br>
>     > From: Marek Olšák <<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a> <mailto:<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a>>><br>
>     ><br>
>     > We have found some pipe_surface leaks internally.<br>
>     ><br>
>     > This is the same code as surface_destroy in radeonsi.<br>
>     > Ideally, surface_destroy would be in pipe_screen.<br>
>     > No, pipe_surfaces are not context objects.<br>
>     Well they are supposed to be...<br>
>     But yes mesa/st doesn't play by the rules there, so I guess that's<br>
>     better than a leak...<br>
> <br>
> <br>
> If it was possible, I would change the rules. create_surface could stay<br>
> in pipe_context, but I would move surface_destroy into pipe_screen.<br>
<br>
I think st/mesa would still use (not just delete) the pipe_surface in<br>
other contexts? If so I don't like the proposal, because it's still a<br>
lie that pipe_surface is a context-based object.<br></blockquote><div><br></div><div>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)</div><div><br></div><div>Marek<br></div></div></div>