llvmpipe: Fix perspective divide interpolation.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 4 Sep 2010 18:51:54 +0000 (19:51 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sun, 5 Sep 2010 09:17:51 +0000 (10:17 +0100)
commitd278ddc00966b6348eb4703b12166c05cf539635
tree11b1b4ef26c8b8224097a3487509bc6c32470337
parentb8684b2458bc9bdcfd6b43dc7c2b8c2d485105fd
llvmpipe: Fix perspective divide interpolation.

Intuition != mathematics, so this time I actually worked out the right
formula for first order approximation of perspective interpolation.

Ironically, per quad divide actually makes things slower when compared
with per pixel divide -- probably because the divide hardware unit is
rarely used, whereas the multiply unit is typically already saturated
and the first order approximation imply more multiplications.
src/gallium/drivers/llvmpipe/lp_bld_interp.c
src/gallium/drivers/llvmpipe/lp_bld_interp.h