<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:neil@linux.intel.com" title="Neil Roberts <neil@linux.intel.com>"> <span class="fn">Neil Roberts</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Triangle disappears with glPolygonMode GL_LINE"
href="https://bugs.freedesktop.org/show_bug.cgi?id=84677">bug 84677</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>neil@linux.intel.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Triangle disappears with glPolygonMode GL_LINE"
href="https://bugs.freedesktop.org/show_bug.cgi?id=84677#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Triangle disappears with glPolygonMode GL_LINE"
href="https://bugs.freedesktop.org/show_bug.cgi?id=84677">bug 84677</a>
from <span class="vcard"><a class="email" href="mailto:neil@linux.intel.com" title="Neil Roberts <neil@linux.intel.com>"> <span class="fn">Neil Roberts</span></a>
</span></b>
<pre>gl_VertexID is implemented by adding in an extra vertex attribute in
brw_emit_vertices. It has a special source which says to set the value of one
of the components to the vertex ID. However the problem seems to be that when
you set the polygon mode to something other than fill then that same function
also sneaks in another attribute to upload the edge flags. This gets added
before the attribute for the vertex ID so I think it is no longer in the
correct register when the vertex shader tries to read it.
A comment in the function says that the attribute for the edge flags has to be
the last one. I guess that implies the order of these attributes should be
swapped around. Indeed it seems to fix the bug if I just swap them over.
However I'm not confident whether the edge flags are actually being uploaded
correctly because I've only tested it with a single triangle and it could be
reading the edge flags from the wrong attribute and it just coincidentally
looks ok.
There is a warning in the gen8 version of the function (gen8_emit_vertices)
that says something about needing to reorder the attributes when VID is used
with edge flags. This was added by Ken so maybe he has some idea about what
needs to be done here.
I will try experimenting with more complex geometry tomorrow to determine if
the edge flags are working correctly when the order is swapped.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>