On 2 July 2012 08:04, Vadim Girlin <span dir="ltr"><<a href="mailto:vadimgirlin@gmail.com" target="_blank">vadimgirlin@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sun, 2012-06-24 at 11:18 +0200, Olivier Galibert wrote:<br>
> That old bug was hidden but the clipper always interpolating in 3d<br>
> space no matter what it should have been doing.  Now that the<br>
> interpolation has been fixed, the bug shows up.<br>
><br>
> Fixes bugzilla 51364.<br>
><br>
> Signed-off-by: Olivier Galibert <<a href="mailto:galibert@pobox.com">galibert@pobox.com</a>><br>
><br>
> diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c<br>
> index e6664fb..9f98298 100644<br>
> --- a/src/mesa/state_tracker/st_program.c<br>
> +++ b/src/mesa/state_tracker/st_program.c<br>
> @@ -569,12 +569,12 @@ st_translate_fragment_program(struct st_context *st,<br>
>           case FRAG_ATTRIB_CLIP_DIST0:<br>
>              input_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;<br>
>              input_semantic_index[slot] = 0;<br>
> -            interpMode[slot] = TGSI_INTERPOLATE_LINEAR;<br>
> +            interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;<br>
>              break;<br>
>           case FRAG_ATTRIB_CLIP_DIST1:<br>
>              input_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;<br>
>              input_semantic_index[slot] = 1;<br>
> -            interpMode[slot] = TGSI_INTERPOLATE_LINEAR;<br>
> +            interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;<br>
<br>
</div>At first glance this change doesn't seem correct, GLSL 1.30 spec says<br>
that clip distances are interpolated linearly. Am I missing something?<br></blockquote><div><br>I think when the spec says "The clip distances will be linearly interpolated across the primitive...", they mean "linear in 3D space".  Interpolating clip distances in screen space would produce really bad artifacts, IMHO.<br>
 </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Vadim<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
>              break;<br>
>              /* In most cases, there is nothing special about these<br>
>               * inputs, so adopt a convention to use the generic<br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
<br>
<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br>