On Monday 18 June 2001 12:00, you wrote:

> I'm also starting to look at the code for the mach64. What do you mean with
> the new driver template code? Are you talking about the structure of the
> ATI driver in the mach64 branch?
> Any help will be appreciated.
>

>From what I can tell about the driver templates, and correct me if I am wrong 
anyone more experienced with the code.  Check out for examples the r128 
driver from the trunk, for a good example.  Notice there are files in there 
such as r128_tritmp.h.  This is a template that gets included in r128_tris.c. 
 What it does basically is consolidate code that is largly reproduced over 
several functions, so that you set a few macros.  For example:

#define IND (R128_TWOSIDE_BIT)
#define TAG(x) x##_twoside

followed by
#include "r128_tritmp.h"

Notice the inline function's name defined in r128_tritmp.h is the result of 
the TAG macro, as well the function's content is dependant on what IND value 
is defined.  So essentially the inline function is a template for various 
functions that have a bit in common.  That way you consolidate common code 
and keep things consistent.

The current mach64 branch is only using one template in the driver.  But yes, 
it does have some of the driver template code there.

Jeremy

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

Reply via email to