Hi,

I was looking at the softpipe code, and it all seems quite interesting.
However, it came to me that the state code was going overly complex.
Especially since you have to write a lot of state functions/atoms yourself.
As with the older DRI code, where most state functions simply end up
gathering state in the mesa state structs, and filling register bits
accordingly (this is really all the same, except with different mesa values
and different register numbers).
This is 2007, why couldn't mesa handle it generically ?

Now, here is the idea I had. What if instead of creating your own atoms by
hand, you just described the state as follows :
- one function that takes a reg number and a value (and possibly a mask) as
input and does the actual register write
- an array of structs describing the state at the hw level (for example,
saying that enabling alpha blending is setting bit 12 in register 0x1234 and
so on for all state)
I think this model applies to all the graphics hardware that I know of.

What this allows :
- mesa can merge multiple writes to the same register (for example for
different states that go to the same register) so this should be more
efficient
- the driver code is simpler, since we don't have to write a pile of state
functions any more (I'm lazy, so that's my main goal)

Ideas ?

Stephane
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to