> >
> > // Scenario for an entry point in libGL.so
> > glFoo() // app makes call
> > -> calls libGL.so:glFoo
> > -> (*dispatch[context].glFoo)() // jump table based on context
> > -> calls libDriver.so:__glFoo_driver_dispatch
>
> So, given what I've proposed above, this would call "__glFoo_driver_MODE()"
> directly, rather that indirectly through the "__glFoo_driver_dispatch"
> function.
Maybe I misunderstand. It seems that you propose collapsing the
context and the driver dispatch into one. I can see only
two ways to make this work.
a) libGL.so:glFoo does
if ( currentContext!=lastContext )
_glFoo_driverMODE = whatever
which adds overhead to every single call
b) glxMakeCurrent manipulates libGL.so
I think the latter would do what you want (just as the
application is best advised to update pointes on
context switch, GLX could do so). One drawback it has
is that it will always update all internal dispatch,
as it does not know what the application might use.
But context switch is expensive, so this might be
acceptable. One issue I have no idea about is whether
this kind of interaction between GLX and GL is desirable.
Anyway, your should amend your proposal by stating how you
want to collapse the two indirections into one, and when.
b.