<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Transform feedback uses incorrect interleaving if a previous draw did not write gl_Position"
href="https://bugs.freedesktop.org/show_bug.cgi?id=88885">88885</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Transform feedback uses incorrect interleaving if a previous draw did not write gl_Position
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Mesa core
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lankyleggy@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=112993" name="attach_112993" title="Reproducer">attachment 112993</a> <a href="attachment.cgi?id=112993&action=edit" title="Reproducer">[details]</a></span>
Reproducer
After a draw with a shader program that has transform feedback varyings set,
and has a geometry shader that does not write to gl_Position, subsequent uses
of transform feedback with interleaved transform feedback attributes can out
write attributes in the wrong order, or with some missing. In every case of
this I've seen, the space used for each vertex's attributes was correct but the
offset within the vertex's data is wrong for some attributes.
The attached program demonstrates the problem. The second draw call writes
three transform feedback attributes. They are a float, a vec3, and another
float. When the transform feedback buffer is read back, the last component of
the vec3 has the value that should have been written to the second float, and
the second float ends up with 0. The output is in the correct order if the
first draw call is removed, if the first draw's geometry shader is changed to
write to gl_Position, or if the geometry shader for the second draw writes only
compile time constants to the transform feedback attributes.
I this bug is consistently reproducible for me. I am using Intel Haswell
graphics, x86_64 architecture, with Fedora 21 and mesa git
b930ef1ce8222156464cfd1e744c9598ace5efbb master branch. The Fedora 21 mesa
10.4.1 and 10.4.2 packages also reproduce the bug.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>