mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 20:40:36 +02:00
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>
This commit is contained in:
parent
ed643d6b2f
commit
ab74fee5e1
1 changed files with 3 additions and 3 deletions
|
|
@ -168,9 +168,9 @@ static void interp( const struct clip_stage *clip,
|
|||
int k;
|
||||
t_nopersp = t;
|
||||
for (k = 0; k < 2; k++)
|
||||
if (in->data[pos_attr][k] != out->data[pos_attr][k]) {
|
||||
t_nopersp = (dst->data[pos_attr][k] - out->data[pos_attr][k]) /
|
||||
(in->data[pos_attr][k] - out->data[pos_attr][k]);
|
||||
if (in->clip[k] != out->clip[k]) {
|
||||
t_nopersp = (dst->clip[k] - out->clip[k]) /
|
||||
(in->clip[k] - out->clip[k]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue