On Thu, Jan 21, 2010 at 10:59 PM, Brian Paul <bri...@vmware.com> wrote: >> This is one of the changes I want to do for a while. GLX was built >> specially >> and before Mesa core because libglapi.a could not be built with >> IN_DRI_DRIVER >> defined. This is no longer the case for a while. > I didn't test, but it looks good to me. > Will we be able to remove IN_DRI_DRIVER entirely at some point? Yes, I think so. For my own use, I have it always defined, which is just like it does not exist.
IN_DRI_DRIVER is used only by the Mesa core. It is used to enable the remap table. The remap table is required because * glapi dispatches glFooBar using the dispatch table * Mesa core uses the dispatch table in some places (all occurrences of CALL_FooBar or _gloffset_FooBar) * glapi and Mesa core might disagree the dispatch table glapi and Mesa core might disagree the dispatch table because GLX and DRI drivers may be compiled with different versions of glapi. Mesa core needs to remap its use of the dispatch table to agree with glapi. This is not the case with "src/mesa/drivers/x11/" and some others, where the glapi and Mesa core always agree the dispatch table. The remapping becomes an overhead for them. This is why the remap table is disabled when IN_DRI_DRIVER is not defined. The remapping is performed for the functions introduced after OpenGL 1.2 (i.e. not in the Linux ABI). I am not sure if CALL_FooBar or _gloffset_FooBar is used in any critical path. If all uses are not critical, we should be able to remove IN_DRI_DRIVER and have the remap table always enabled. I think the purpose of the remap table and IN_DRI_DRIVER might deserve some documentation. I am willing to do that if you can point me a place to add it. -olv ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev