All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 99843] Geometry Shader - Incorrect Output
@ 2017-02-16 20:24 bugzilla-daemon
  2017-02-16 21:13 ` bugzilla-daemon
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: bugzilla-daemon @ 2017-02-16 20:24 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 2274 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=99843

            Bug ID: 99843
           Summary: Geometry Shader - Incorrect Output
           Product: Mesa
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/radeonsi
          Assignee: dri-devel@lists.freedesktop.org
          Reporter: dan@jerber.co.uk
        QA Contact: dri-devel@lists.freedesktop.org

Created attachment 129684
  --> https://bugs.freedesktop.org/attachment.cgi?id=129684&action=edit
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).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3759 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-09-18 19:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 20:24 [Bug 99843] Geometry Shader - Incorrect Output bugzilla-daemon
2017-02-16 21:13 ` bugzilla-daemon
2017-02-16 22:13 ` bugzilla-daemon
2017-02-16 22:16 ` bugzilla-daemon
2017-02-17 17:00 ` bugzilla-daemon
2017-02-17 17:01 ` bugzilla-daemon
2017-02-17 23:53 ` bugzilla-daemon
2017-02-17 23:55 ` bugzilla-daemon
2017-02-18  6:42 ` bugzilla-daemon
2017-02-18 11:38 ` bugzilla-daemon
2017-02-19 17:46 ` bugzilla-daemon
2017-06-22 17:07 ` bugzilla-daemon
2017-11-01 15:24 ` bugzilla-daemon
2017-11-01 15:30 ` bugzilla-daemon
2017-11-06  7:56 ` bugzilla-daemon
2017-11-06 10:10 ` bugzilla-daemon
2017-11-06 20:09 ` bugzilla-daemon
2019-09-18 19:22 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.