On Mon, Mar 10, 2003 at 10:36:21PM +0000, Keith Whitwell wrote:
> No, because one of the things C++ does is pass around an extra parameter -- 
> namely the 'self' pointer.  The 'real' prototype looks something like:
> 
>       void Context::BlendFunc( Context *self, GLenum sfactor, GLenum 
>       dfactor )

I know this, that's why I thought there could be a remote chance to make
it work, as the arguments mostly match, i.e., ctx = self.

> -- but there's no guarentee that this is actually what is happening, or 
> that it won't change.  Yes, I know there is an ABI now -- but I've no idea 
> what it actually specifies. 

That's my doubt too.

> >As I said above this can be done in C++, and without damage to
> >efficiency.
> 
> Except that the functions plugged into the dispatch table cannot be C++ 
> methods, as the prototypes are defined, and don't include the magic C++ 
> self pointer.

But the function I put in the table _was_ an ordinary function, and not
a C++ method, and no redirection call would take place with inlining.
That was the point of the explanation...

> I've deleted the rest of your explanation as unfortunately I don't think it 
> can be made to work.

I've deleted the rest of your comment as unfortunately I don't agree
with any of it. But I've read it.

The principles of doing everything explicitly to achieve better
performance are great etc, but at this point we don't have the manpower
on DRI to do this kind of development. This is something that is better
to rely on C++ to do it for us, as _much_ as possible, even knowing that
you could achieve better with explicit C or even assembly coding. This
is a burden of higher-level languages.

My main priority with the C++ framework is first to _speed_ development.
Most of the performance enhancements will be a side-effect for having more
free time to optimizate, and being able to do it in a driver-inpendent
fashion. And yes, I do believe that, with care, C++ won't create a
noticeable overhead, but there's no point to discuss it, as we can
simply benchmark it on the end.

José Fonseca
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to