r300: Fix fogcoord rewriting
authorNicolai Hähnle <nhaehnle@gmail.com>
Sun, 12 Jul 2009 02:03:25 +0000 (02:03 +0000)
committerMaciej Cencora <m.cencora@gmail.com>
Mon, 13 Jul 2009 17:28:15 +0000 (19:28 +0200)
commitf06910f6c34f199dc187bd69ff1f6889ba498217
tree1ace78df82acea69e353ff1c1ae560b8ca2a41de
parent3f5382819e31071c2af6cb39c1ca09bf3243f83f
r300: Fix fogcoord rewriting

We only care about the actual fogcoord itself now, reducing the rewriting
done for the vertex program.

The rewriting of source operand swizzles in the fragment program takes
care that fogcoord.yzw = 001.

This should fix fogcoord rewriting entirely, which had been horribly
broken in the face of dot-product instructions, and just broken (though
not horribly so) in the face of almost every other instruction (the W
component would be incorrect for most arithmetic instructions).

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
src/mesa/drivers/dri/r300/r300_fragprog_common.c
src/mesa/drivers/dri/r300/r300_vertprog.c
src/mesa/drivers/dri/r300/radeon_program.h