Leif Delgass wrote:
On Wed, 5 Feb 2003, Leif Delgass wrote:

Also, should I go ahead and commit my revised texmem patch?
Yes.
OK, will do. Do you want to commit your patch for combine3 to texmem? I
don't have an R200, so I can't test that, but it looks like it should be
easy to add there too. If SUBTRACT is the only problem, I don't think that should prevent you committing it, as that's apparently a problem even without the extension.
I went ahead and committed my texmem changes as well as combine3 for
radeon and r200 (including the change to the zero/one table).  I can't
test the r200 version, but it looks almost identical to R100.
Cool. I can't think of any reason why those changes couldn't also go into the trunk.

I noticed that in the check for the scale factor in the Radeon driver, it uses RADEON_SCALE_4X for dot3. Should that be RADEON_SCALE_1X? That's what the r200 driver uses for the EXT version (R200_TX[C,A]_SCALE_1X).
There's two issues at play here. The first is that the R200 driver is wrong. The second is that R100 cannot fully implement the ARB version of the extension.

From table 3.20, the equation for DOT3_RGB is:

DOT3_RGB_ARB 4*((Arg0_r - 0.5)*(Arg1_r - 0.5) +
(Arg0_g - 0.5)*(Arg1_g - 0.5) +
(Arg0_b - 0.5)*(Arg1_b - 0.5))

http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_env_dot3.txt
http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_env_dot3.txt

In addition, RGB_SCALE is applied. On BOTH R100 & R200, the DOT3 combine mode does not automatically apply the '4*' in the combine equation. On r100, the only way to get this is by setting an RGB_SCALE of 4x. This is why the R100 driver falls back to software rasterization for DOT3_RGB_ARB when RGB_SCALE != 1x. The R100 cannot handle an RGB_SCALE larger than 4x. I actually asked some ATI engineers at the September ARB meeting about this. This does not apply to the EXT version because it ignores the scale value. That's why the EXT and ARB versions have different enumerants.

This is part of the problem on R200 as well. The other part of the problem is that R200 does not automatically do the '- 0.5' bias. The driver has to set R200_TXC_SCALE_ARG_[AB] and R200_TXC_BIAS_ARG_[AB]. It also has to increase the post-scale by 1 (i.e., a scale of 1x becomes 2x, 2x becomes 4x, and 4x becomes 8x).



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to