On Wed, 2002-03-06 at 17:24, Ian Romanick wrote:
> On Wed, Mar 06, 2002 at 12:38:38PM +0000, José Fonseca wrote:
> > I finally figured out what I was doing wrong when attempting to do 
> > premultiply the tex coords. Unfortunately I was making a lot of mistakes 
> > (such as remultiplying in reused vertices on primitive drawing functions, 
> > igoring the coordinate pointer increment in _vbtmp.h so effectively 
> > reading the homogeneous coord from the vertex ahead, and forgetting the 
> > vertex interpolation for clipping) which took me a bunch of time to 
> > debug...
> 
> Heh...sounds like you have to decide between all the usual tradeoffs.  At
> this point, you really only need to consider the following two criteria for
> picking your implementation.  In truth, you probably only need the first one.
> 
> 1. Which way is the easiest to implement correctly?
> 2. What is the most common path?  Optimize for that and pretty much ignore
>    the performance of the other code paths.
> 

This seems the most reasonable thing to do.

> >From your other comments and from Keith's comments, it sounds like doing the
> divide in emit is the best bet.  This is especially the case if you can
> borrow code / ideas from the tdfx driver.  Once you get it all working you
> might even want to go back and see if there is some way to pull code out of
> both drivers and put it in mesa/src/drv/common.  There seems to be quite a
> bit of duplicated / similar code in the drivers.

Yes, there is a substancial amount of duplication, but e.g., the
_vbtmp.h template is quite hairy as it is now with all options that it
gives. Keeping adding stuff to a big and complex template can be rather
error prone, since it gets difficult to predict the effect of the
changes.

One thing that could be investigated is trying to break these big
templates in further smaller overridable modular templates, i.e., where
there is a set of default macros that boil down to a function which the
source file customizes by defining it's own methods, instead of defining
just the code-path.

> 
> -- 
> Tell that to the Marines!
> 

Jose Fonseca


_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to