llvmpipe: Fix perspective interpolation for point sprites.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 26 Sep 2010 10:22:20 +0000 (11:22 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 6 Oct 2010 10:44:59 +0000 (11:44 +0100)
commite74955eba3fc22fcf6e9111a4e5bbc095d34d357
tree0cb6dc63712366064753e68d60468e6839de9d27
parent446dbb921762710d678486f3f5a6dfdf318fe34c
llvmpipe: Fix perspective interpolation for point sprites.

Once a fragment is generated with LP_INTERP_PERSPECTIVE set for an input,
it will do a divide by w for that input. Therefore it's not OK to treat LP_INTERP_PERSPECTIVE as
LP_INTERP_LINEAR or vice-versa, even if the attribute is known to not
vary.

A better strategy would be to take the primitive in consideration when
generating the fragment shader key, and therefore avoid the per-fragment
perspective divide.
src/gallium/drivers/llvmpipe/lp_setup_point.c