<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTOURBUG - Fragment shader while loop causes geometry corruption"
href="https://bugs.freedesktop.org/show_bug.cgi?id=98664#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTOURBUG - Fragment shader while loop causes geometry corruption"
href="https://bugs.freedesktop.org/show_bug.cgi?id=98664">bug 98664</a>
from <span class="vcard"><a class="email" href="mailto:imirkin@alum.mit.edu" title="Ilia Mirkin <imirkin@alum.mit.edu>"> <span class="fn">Ilia Mirkin</span></a>
</span></b>
<pre>(In reply to Nicolai Hähnle from <a href="show_bug.cgi?id=98664#c10">comment #10</a>)
<span class="quote">> The geometry shader is incorrect. I guess it works on i965 because the NIR
> path skips some optimizations that are allowed by the GLSL spec, which has
> this to say about EmitVertex():
>
> "Emits the current values of output variables to the current
> output primitive. On return from this call, the values of
> output variables are undefined."
>
> In other words, you need to store outMinEdge / outMaxEdge in temporary
> variables.</span >
FWIW I've noticed that NVIDIA blob tends to go exactly counter to this, and
explicitly "latches" the values. (While i965 hardware behaves this way by
default, NVIDIA hw does not - it takes extra effort to make it do that, and the
NVIDIA blob does it. We've resorted to doing it for gl_Layer/gl_ViewportIndex
in nouveau, but not other varyings.)
Note that it's not necessary to re-emit flat varyings for every vertex, just
the provoking vertex. This tends to be the last vertex by default, I believe.
(And I don't know if that's prior to strip decomposition or not.)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>