<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:danylo.piliaiev@gmail.com" title="Danylo <danylo.piliaiev@gmail.com>"> <span class="fn">Danylo</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - lighting render issue with i965 on SKL+"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103047">bug 103047</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>danylo.piliaiev@gmail.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - lighting render issue with i965 on SKL+"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103047#c14">Comment # 14</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - lighting render issue with i965 on SKL+"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103047">bug 103047</a>
from <span class="vcard"><a class="email" href="mailto:danylo.piliaiev@gmail.com" title="Danylo <danylo.piliaiev@gmail.com>"> <span class="fn">Danylo</span></a>
</span></b>
<pre>I found that the underlying cause of the issue lies in the combination of flat
shading, provoking vertex and clipped polygons.
Reproducing the issue is easy:
- Have glShadeModel set to GL_FLAT, smooth doesn't have such issue
- Have glProvokingVertexEXT set to GL_LAST_VERTEX_CONVENTION_EXT, first vertex
mode seems not to exhibit the issue
- Create triangle strip with 3 vertices out of screen with blue color, two
vertices on screen where the last one has red color (colors themself don’t
- Expected color of the triangle is red because color should be taken from last
vertex but on Intel GPU triangle is blue
I asked Jason to help me, I'll quote his answer:
<span class="quote">> I think what you've found is a hardware bug. :-(
> It appears that the clipper is messing up provoking vertex whenever entire
> polygons are clipped.</span >
<span class="quote">> What do we do about it? That's an interesting question.
> The most obvious thing that jumps out to me would be to do a shader
> workaround where we tell the hardware that flat inputs are not flat
> (so it passes in all three vertices) and then manually grab the correct
> one of the three interpolants based on which provoking vertex is set.
> I don't think provoking vertex is something that applications change
> frequently so having a bit in the FS shader key probably isn't too
> bad for this.</span >
I've sent a patch to Piglit which reproduces the bug -
<a href="https://patchwork.freedesktop.org/patch/229260/">https://patchwork.freedesktop.org/patch/229260/</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>