bernd kreimeier wrote:
> 
> > >
> > >     // Scenario for an entry point in libGL.so
> > >     glFoo() // app makes call
> > >       -> calls libGL.so:glFoo
v> >
> > 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.

Sorry, I tried to make this clear, but apparently didn't.

Jon's example of a libGL dispatch entrypoint contains this:

  -> (*dispatch[context].glFoo)()     // jump table based on context
     -> calls libDriver.so:__glFoo_driver_dispatch

My proposal would change it to this:

  -> (*dispatch[context].glFoo)()     // dynamic jump table based both
                                      // on context and driver state.
     -> calls libDriver.so:__glFoo_driver_MODE

This is accomplished by allowing the driver to manipulate the
contents of the context's jump table (through an appropriate and
well defined API of course).  The libDriver.so:__glFoo_driver_dispatch
function is redundant, and doesn't need to even exist!

I hope this makes the concept clearer.

Cheers!
begin:vcard 
n:Johnson;Brett
x-mozilla-html:FALSE
org:Hewlett-Packard;Worstation Systems Lab
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
title:WSL Turtle Master
fn:Brett Johnson
end:vcard

Reply via email to