On Sat, Mar 22, 2003 at 06:55:08PM +0000, Keith Whitwell wrote:
> Brian Paul wrote:
> >Unfortunately, we can't change this without breaking the current libGL / 
> >driver ABI.  I'm _really_ hesitant to go there.
> 
> Oh wow, I missed this.  (I've been sleeping really badly lately & 
> everything's kindof hazy)
> 
> You really don't want to do this.  The right solution is the one Gareth's 
> been persuing for specialized fast TLS for GL, that brings the cost of 
> these lookups down to almost zero.
> 
> In any case, this solution would be slower than our current one as it 
> would involve constructing a new stack frame for the dispatch call, or 
> somehow modifying the existing one. ... Hmm... I suppose you could stick 
> the ctx value in a register instead of putting it on the stack.
> 
> But the other point is -- the dispatch functions don't retrieve the 
> context, they retreive the active dispatch table, which is a completely 
> different variable, so the proposed savings don't really exist.
> 
> There are TWO TLS variables:  Current context, Current dispatch table,  
> and they're effectively independent.

I see.

> Oh yes, and for the most highly optimized API functions 
> (radeon_vtxfmt_X86.S), we don't need to retreive the Context value anyway 
> -- it's hardcoded into runtime generated code.

Uuhh... neat! BTW, I suppose you meant radeon_vtxfmt_x86.c as I couldn't
find radeon_vtxfmt_X86.S anywhere). Now I have to think how can I use
this idea on the C++ framework... Anyway, as I said to my reply to
Brian, this issue is not as urgent as the other things. Thanks for the
pointer.

Also, I can't help thinking that some of these tricks wouldn't be
necessary if the OpenGL standard had chosen to pass opaque pointers
(i.e., handles) to contexts and textures, instead of using concepts such
as "current context" and "texture names", but this is OT anyway.

José Fonseca


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to