i965/fs: Clear result before visiting shadow comparitor and LOD info.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 22 Jul 2011 04:17:10 +0000 (21:17 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 25 Jul 2011 17:45:56 +0000 (10:45 -0700)
commit156cef0fbacf242e8fc67e39ab964e5f8f3739cb
treed6e21cd6440f8d38932052d8783f066f5c98fb12
parent7746b7d4bf48b75dd273510e7a6ad6405c91b8bb
i965/fs: Clear result before visiting shadow comparitor and LOD info.

Commit 53c89c67f33639afef951e178f93f4e29acc5d53 ("i965: Avoid generating
MOVs for assignments of expressions.") added the line "this->result =
reg_undef" all over the code.  Unfortunately, since Eric developed his
patch before I landed Ivybridge support, he missed adding it to
fs_visitor::emit_texture_gen7() after rebasing.

Furthermore, since I developed TXD support before Eric's patch, I
neglected to add it to the gradient handling when I rebased.

Neglecting to set this causes the visitor to use this->result as storage
rather than generating a new temporary.  These missing statements
resulted in the same register being used to store several different
values.

Fixes the following piglit tests on Ivybridge:
- glsl-fs-shadow2dproj.shader_test
- glsl-fs-shadow2dproj-bias.shader_test

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp