<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, May 9, 2016 at 4:41 PM Adam Jackson <<a href="mailto:ajax@nwnk.net">ajax@nwnk.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 2016-04-04 at 19:57 +0000, Guilherme Melo wrote:<br>
> Updated patch with some other places with a potential leak.<br>
<br>
Apologies for being so slow to look at this.<br>
<br>
Unfortunately I think it's incorrect.  lastGLContext is not necessarily<br>
of __GLXcontext type - glamor sets it a glamor_ctx *, for example - so<br>
passing it to ->loseCurrent isn't always going to work.<br> 
<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think your first patch that only did the loseCurrent from<br>
__glXForceCurrent was closer to correct.<br></blockquote><div> </div><div><br></div><div> Thanks for the feedback.<br><br></div><div>I did not know that lastGLContext was shared with glamor.<br>So it really seems the first patch is more appropriate. I just thought it was confusing because it actually needs to lose the same context that it is currently making current.<br><br></div><div>I'll resend the patch soon.<br></div><div><br><br></div><div>Guilherme<br></div><div><br></div></div></div>