With the current protocol and implementations, we have to often call DRI2CreateDrawable but can never call DRI2DestroyDrawable. This ends up with us leaking references to DRI2Drawables based on the assumption that the references have identical lifetimes to the Drawable going astray. This was spotted by Daniel Drake as the mali driver would create a new reference to the DRI2Drawable on every GetBuffers, but it can also be observed in mesa when running synthetic benchmarks (creating lots of contexts/glxdrawables for each window) and to a lesser extent with normal composited operation.
The first two patches implement the capping of the unnamed internal reference used by DRI2CreateDrawable to just one per Client. The third patch uses a pair of new DRI2 requests to allow the Client to explicitly manage the lifetime via use of a named reference to the DRI2Drawable. -Chris _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
