draw: fix problem in screen-space interpolation clip code
authorBrian Paul <brianp@vmware.com>
Mon, 21 Jan 2013 18:41:02 +0000 (11:41 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 22 Jan 2013 21:53:58 +0000 (14:53 -0700)
commitab74fee5e1a3fc3323b7238278637b232c2d0d95
treedc8b655c0e8c5a923d5984e60d1cff52a6d961df
parented643d6b2fa11082f617f24040c73d2c58ca09bf
draw: fix problem in screen-space interpolation clip code

I don't see how this could have ever worked right.

The screen-space interpolation code uses the vertex->data[pos_attr]
position which contain window coords.  But window coords are only
computed for the unclipped vertices; the clipped vertices have
undefined window coords (see draw_cliptest_tmp.h).

Use the vertex clip coords instead which are always defined.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=55476
(piglit fbo-blit-stretch failure on softpipe)

Note: This is a candidate for the 9.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_clip.c