dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 99843] Geometry Shader - Incorrect Output
Date: Thu, 16 Feb 2017 20:24:35 +0000	[thread overview]
Message-ID: <bug-99843-502@http.bugs.freedesktop.org/> (raw)


[-- 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

             reply	other threads:[~2017-02-16 20:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 20:24 bugzilla-daemon [this message]
2017-02-16 21:13 ` [Bug 99843] Geometry Shader - Incorrect Output 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99843-502@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).