<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 - Geometry Shader - Incorrect Output"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99843">99843</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Geometry Shader - Incorrect Output
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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/Gallium/radeonsi
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dan@jerber.co.uk
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=129684" name="attach_129684" title="Typical output">attachment 129684</a> <a href="attachment.cgi?id=129684&action=edit" title="Typical output">[details]</a></span>
Typical output

Hi,

I am developing a cross-platform application. I have recently found an issue
that is only present when it is tested on a Ubuntu machine. I have managed to
find a minimal example that shows the issue as follows:

The vertex shader:

#version 150
in vec2 pos;

void main(void)
{
    gl_Position = vec4(pos, 0.0, 1.0);
}


The fragment shader:

#version 150
out vec4 outColour;

void main(void)
{
    outColour = vec4(1.0f, 1.0f, 1.0f, 1.0f);
}


The geometry shader:

#version 150
layout(points) in;
layout(line_strip, max_vertices = 13) out;
uniform mat4 vpMatrix;

void main()
{
    for(int i = 0; i < 13; i++)
    {
        float polygonAngle = (i * 30) + 90.0f;
        vec4 vertexPosition = vec4((sin(radians(polygonAngle)) * 0.5f) +
gl_in[0].gl_Position.x, (cos(radians(polygonAngle)) * 0.5f) +
gl_in[0].gl_Position.y, 0.0f, 1.0f);
        gl_Position = vpMatrix * vertexPosition;
        EmitVertex();
    }
    EndPrimitive();
}

The problem occurs when the shader program is used with multiple VBO's. For
example:

3 separate VBO's are created with {-1.0f, 1.0f}, {1.0f, 1.0f}, {1.0f, -1.0f} as
the data. Then, for each repaint:

for(int i = 0; i < 3; i++)
{
    Bind array buffer i.
    glDrawArrays(GL_POINTS, 0, 1);
}

This produces strange results for the third polygon (shown in the attached
image Output.JPG).

If tested on a Windows 10 machine (exactly the same hardware) or an OSX
machine, the results are as expected (3 regular polygons with 12 sides).</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>