Ville Syrj=E4l=E4 wrote:
> On Sun, Aug 03, 2003 at 01:14:21PM -0700, Ian Romanick wrote:
>>Ville Syrj=E4l=E4 wrote:
>>>Hw can't support dot3 stuff. Also RGB_SCALE and ALPHA_SCALE only work
>>>fully with GL_MODULATE. GL_REPLACE can't support this at all the other=
>>>support only a value of 1.
>>Dot3 is one of the truly frustrating things about the G400. It has all=
>>the hardware to do it. It has the MODULATE arithmetic followed by the=20
>>ADD in almost the right way. Too bad they didn't think to wire the ADD=
>>logic that way. :( Of course, at the time they thought EMBM was going=20
>>to be the thing of the future...
> Well at least ATI_envmap_bumpmap should be possible. It's on my todo li=
> but I just wanted to get the basic stuff working first.
Right. That extension is *exactly* the EMBM functionality from DirectX=20
that the G400 pioneered. The G400, R100, R200, and i830 all implement=20
this functionality. The only catch (and the reason I haven't=20
implemented this extension on the ATI cards) is that we need the SW path=20
in Mesa first.
Looking at the way texturing works in Mesa, I can't see any way to=20
implement it without great, GREAT difficulty or using a fragment=20
program. Brian, would that be your assessment as well?
>>On GL_REPLACE, it can handle scaling in most cases. You just have to=20
>>program the alpha input to be 1, select the correct color input, and us=
>>the modulate with the correct scale.
> But how do I program the alpha input to 1? I think the FCOL register is
> the only way to do that but then CONSTANT + SRC_ALPHA or
> ONE_MINUS_SRC_ALPHA wouldn't work. Maybe I should do it anyway and if
> are needed then do the fallback. It would affect GL_BLEND too...
In looking at the docs again, I think you are correct. It would require=20
even MORE special-casing than I thought. Maybe we should just compile a=20
list of classes of modes that require the SW fallback and wait to fix=20
any of them until someone complains (or offers a patch). :)
Also, doing 'strings /usr/local/games/ThinkTanksDemo/ThinkTanks.bin |=20
grep GL_' leads me to believe that ThinkTanks might be a useful=20