José Fonseca wrote:
On Mon, Mar 10, 2003 at 08:32:18PM +0000, Keith Whitwell wrote:

José Fonseca wrote:


Once textures are finished, the most tricky will be the software
rasterizer and the TnL module. For these my idea is to make the driver
able to switch rasterizers and/or TnL modules in real time, with the its
own hardware accelerated versions or the software versions.

The driver already does this -- the tnl module is swapped in/out by the code in radeon_vtxfmt.c, the rasterizer is swapped by RADEON_FALLBACK().


Thank for pointing that out, as I didn't knew this - I though it just changed a few 
entry points in a
callback table as done with swrast. The tnl module thing is still
unknown territory for me as the embeded radeon drivers overrides the
glapi dispatch table and emits DMA vertices buffers directly.


Actually there's probably too much mechanism propping up the tnl module swapping at the moment. I think a better approach would be just to swap in a whole new dispatch table when the vtxfmt code is viable.


What disptach table would you be referring to, glapi or the TnL one? The
problem with disptach tables is that they completely break the OOP
concept as they work with regular functions instead of object methods.

That's a problem with the OOP concept, then. Techniques based around switching and updating dispatch tables are *the* way to do fast GL drivers.


What are the specific problems of the module swapping?

The current mechanism tries to make it fast to swap *portions* of a dispatch table. Better just to maintain two different tables & switch between them.


Of course, that doesn't mean that the tables are static -- incremental updates of a dispatch table are a key mechanism to managing GL statechanges (which is underutilized in the current drivers).


We could do OUTSIDE_BEGIN_END testing the same way for free.


You lost me here...

In the simplest example you'd have two dispatch tables -- one for inside begin/end, one for outside. Switch between them in Begin and End. The inside one has 'Error' stubs for all state functions, and the tnl driver plugged in. The outside one has the state functions (which no longer need to check for OUTSIDE_BEGIN_END), and some special-case handlers for Color,Vertex,etc.


Keith



-------------------------------------------------------
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