From: George S. <gsa...@gm...> - 2010-03-10 00:19:00
|
On Mon, Mar 8, 2010 at 10:37 PM, Ian Romanick <id...@fr...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > George Sapountzis wrote: > >> I made a small test to test code genration for dynamic extensions in >> http://cgit.freedesktop.org/~gsap7/mesa/log/?h=getproc-test >> >> When using libGL + swrast_dri.so from getproc-test, the dynamic >> extensions code is not exercised and the test passes. >> >> When using libGL from mesa 7.7 and swrast_dri.so from getproc-test, >> the extension string does contain GL_MESA_test_extension but the test >> segfaults. > > There are a few places where this could break. > > - The generated dispatch stub function is wrong. > - The dispatch offset used by the driver is wrong. > - The dispatch remapping used by the driver is wrong. > It turned out that there were two bugs in glapi. One with using non-exec memory and the other with using an un-relocated function template for entry-point generation. I put fixes at: http://cgit.freedesktop.org/~gsap7/mesa/log/?h=getproc-debug I also tested with libGL pretending to not know fbo extensions, the fbo* demos and tests render correctly. I get a warning about an invalid enum in RenderbufferStorageMultisample(target) but i don't know where it comes from and it does not affect rendering. Since we are already generating static dispatch stubs for all known extensions, I guess we can add a few more static stubs and use them, instead of generating on-the-fly. I put an example about this in the getproc-debug branch, but I don't know if it's a good idea. regards, George. |