On Tue, 21 Dec 1999, Martin Lexa wrote:

> To Jon: Should be possible to have generic accel target in Mesa tree, 
>        which will use the predefined functions e.g draw_triangle(...),
>        draw_line. 

        Sure it is possible.  Whether it is efficient is another story
entirely.  Some hardware/drivers will be able to handle compiled vertex
arrays and some won't, some will be able to draw strips and fans and
others won't, some will expose T&L and others won't, etc etc.  And going
through another functional indirection won't be good for rendering speed.
Intermediate-level target libraries should handled detection, setup and
routing but should avoid imposing a performance burden on the rendering
codepath unless absolutely necessary.  

        I'd like to stick to a generic KGI target and a set of
driver-specific helper libs.  This will mirror the way that the base
LibGGI genkgi and fbdev targets are laid out, which is as it should be in
an extension.  Besides, the Mesa device driver interface is so well
defined that all you end up writing is a very thin bridge to the same set
of common Mesa functions anyway, so you can make extensive use of macros
to set up template functions.  We already do a lot of templates for the
unaccelerated code.

>        Of course these will be wrappers to mesa functions.

        Better to use macros which don't impose a code penalty.

>        I think it would be possible. If the card will not have these
>        functions then it will use the generic ones. Do you understand me?

        Sure.

Jon 

---
'Cloning and the reprogramming of DNA is the first serious step in 
becoming one with God.'
        - Scientist G. Richard Seed

Reply via email to