Adam Jackson <[email protected]> writes: > I broke this, back in: > > commit a48dadc98a28c969741979b70b7a639f24f4cbbd > Author: Adam Jackson <[email protected]> > Date: Mon Mar 21 11:59:29 2011 -0400 > > glx: Reimplement context tags > > In that, I changed the glx client state to not explicitly track the list > of current contexts for the client (since that was what we were deriving > tags from). The bug was that I removed the code for same from > glxClientCallback without noticing that it had the side effect of > effectively de-currenting those contexts, so that ContextGone could free > them. So, if you had a client exit with a context still current, the > context's memory would leak. Not a huge deal for direct clients, but > viciously bad for indirect, since the swrast context state at the bottom > of Mesa is like 15M. > > Fix this by promoting Bool isCurrent to ClientPtr currentClient, so that > we have a back-pointer to chase when walking the list of contexts when > ClientStateGone happens.
Patch 1/3 is: Reviewed-by: Eric Anholt <[email protected]> But I'm lost on this one. loseCurrent is just ->core->unbindContext, which is mesa's dri_util.c dereferencing the drawables and calling the driver UnbindContext, which is just _mesa_make_current(NULL, NULL, NULL) regardless of the current context. That doesn't seem to add up to a savings of a leaked context per client gone (since whatever current context that was otherwise unreferenced would get reaped at the next makecurrent). So I'm pretty sure I'm missing something. Also, you've got some fresh tab indentation in the last hunk.
pgpzgDQ8Fpa5g.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
