On Tue, Mar 5, 2013 at 9:11 AM, Alexander Monakov <amona...@ispras.ru>wrote:
> > > On Mon, 4 Mar 2013, Carl Worth wrote: > > > I don't think it should be too hard to get this to work, (though it > > may require a source change to the Steam overlay). I'll do some more > > experiments tomorrow and see if I can't make a concrete recommendation > > to be able to give to Valve as a bug report. > > > > And, obviously, if there's something we can do to make apitrace more > > robust here, I'll submit that change as well. > > I faced a similar issue in my lightweight OpenGL offloading via GLX forking > project, primus [1], and I'm successfully using the following approach: > > 1) The interposition is based on LD_LIBRARY_PATH augmentation, LD_PRELOAD > is > not employed. Pro: no ugly tricks with dlopen/dlsym interposition. > Contra: > the interposer needs to know the path to the "real" OpenGL library. For > APITrace, /usr/$LIB/libGL.so.1 will usually be a working default choice > (NB: > $LIB is a special token expanded by the dynamic loader, not the shell). > > 2) Specifically in order to work with the Steam overlay, the interposer > *protects itself from dlsym interposition* by using > real_dlsym = dlsym(dlopen("libdl.so.2"), "dlsym"). Similar protection > against > dlopen interposition would also make sense. > > Hope that helps, > > Alexander > > [1] https://github.com/amonakov/primus > _______________________________________________ > apitrace mailing list > apitr...@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/apitrace > FYI, with https://github.com/apitrace/apitrace/commit/7700f74f294a28e57860487b917c8807156b3ad1 apitrace no longer crashes with Steam overlay. But the overlay's rendering is not shown/captured when when apitrace uses LD_PRELOAD. But using LD_LIBRARY_PATH mechanism captures everything just fine. Detailed instructions on https://github.com/apitrace/apitrace/wiki/Steam Jose
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev