i965/gen4: Fix fragment program rectangle texture shadow compares.
authorEric Anholt <eric@anholt.net>
Wed, 18 Sep 2013 19:32:31 +0000 (12:32 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 21 Sep 2013 23:48:58 +0000 (16:48 -0700)
commit938956ad52bc7659212b5877080967d4af0aad81
tree3c298f969dcbcc7a53c689d9ec817f3d1dbaae0b
parent1266f01dc76fb58dbbc2df6c1c639c9373584393
i965/gen4: Fix fragment program rectangle texture shadow compares.

The rescale_texcoord(), if it does something, will return just the
GLSL-sized coordinate, leaving out the 3rd and 4th components where we
were storing our projected shadow compare and the texture projector.
Deref the shadow compare before using the shared rescale-the-coordinate
code to fix the problem.

Fixes piglit tex-shadow2drect.shader_test and txp-shadow2drect.shader_test

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69525
NOTE: This is a candidate for stable branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_fp.cpp