Fix some issues with perspective-corrected interpolation.
authorBrian <brian.paul@tungstengraphics.com>
Tue, 18 Sep 2007 18:55:20 +0000 (12:55 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 18 Sep 2007 18:56:23 +0000 (12:56 -0600)
commit2a460f6185199bad8b2bca4d0bac319377f801fa
tree63a190340a554027851fc5af77c34d49e62a26d3
parent72b0a57cfa99e55ad6e1b4ddcd486c202ee1f22d
Fix some issues with perspective-corrected interpolation.

In mesa_to_tgsi.c, use TGSI_INTERPOLATE_PERSPECTIVE by default (to match
post-transform vertex info convention).  More to be done there...
In sp_quad_fs.c, interpolate W in addition to Z.  This fixes the divide
by zero happening in perspective_interpolation() tgsi_exec.c
As it was, we were only getting perspective correction of texture coords
used by the TGSI_TEX instruction since it does a homogeneous divide.
Other coords/varyings were incorrect.
src/mesa/pipe/softpipe/sp_quad_fs.c
src/mesa/pipe/tgsi/exec/tgsi_exec.c
src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.c