<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 - [i965] GS instancing (gl_InvocationID) reads garbage instead of what the vertex shader says"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96354">96354</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[i965] GS instancing (gl_InvocationID) reads garbage instead of what the vertex shader says
</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>Drivers/DRI/i965
</td>
</tr>
<tr>
<th>Assignee</th>
<td>idr@freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>thematrixeatsyou@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=124298" name="attach_124298" title="Point-to-cube geometry shader with toggleable GS instancing">attachment 124298</a> <a href="attachment.cgi?id=124298&action=edit" title="Point-to-cube geometry shader with toggleable GS instancing">[details]</a></span>
Point-to-cube geometry shader with toggleable GS instancing
Overview:
If GLSL 4.00 GS instancing is enabled via the `layout(invocations = x) in;`
layout specifier (where x > 1), the GS no longer reads valid data from the
vertex shader.
Steps to Reproduce:
You will need a GPU which currently supports GLSL 4.00. This is currently
restricted to gen8+.
1) Find a geometry shader you can change.
2) Ensure the #version directive is 400 or higher - if not, bump it up to
400.
3) Add this line near the top of it:
layout(invocations = 2) in;
4) Observe that the geometry is now garbage or apparently missing (degenerate
/ culled primitives).
Attached is a geometry shader with toggleable GS instancing. It requires
GL_POINTS as input.
vec3 v_vtx[], v_col[] are vertex and colour attribute data respectively.
mat4 Mproj, Mcam are projection and modelview matrices respectively.
vec3 campos is the position of the camera in the world.
Expected Results:
For the given shader, input points should be expanded to cubes of their
respective colours.
Actual Results:
A single black cube appears at (0, 0, 0).
In some frames you may see intermittent garbage - this is noticeable at
~3000FPS with vsync disabled.
The uniform data is being read correctly, but the VS input data is completely
wrong.
Additional Information:
Build Date: 2016-06-03 ~15:30 +1200
Git Revision: d10ae20b9678f1a5b8a81716c68e612662665277
GPU: Intel HD 530 (Skylake GT2)
OS: Void Linux
This bug may be relevant (#93859) - the output is SIMD8:
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement SIMD8 instanced geometry shader support"
href="show_bug.cgi?id=93859">https://bugs.freedesktop.org/show_bug.cgi?id=93859</a></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>