From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 99843] Geometry Shader - Incorrect Output
Date: Thu, 16 Feb 2017 20:24:35 +0000
Message-ID:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1390385524=="
Return-path:
Received: from culpepper.freedesktop.org (culpepper.freedesktop.org
[IPv6:2610:10:20:722:a800:ff:fe98:4b55])
by gabe.freedesktop.org (Postfix) with ESMTP id EC2546E2EF
for ; Thu, 16 Feb 2017 20:24:35 +0000 (UTC)
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: dri-devel-bounces@lists.freedesktop.org
Sender: "dri-devel"
To: dri-devel@lists.freedesktop.org
List-Id: dri-devel@lists.freedesktop.org
--===============1390385524==
Content-Type: multipart/alternative; boundary="14872766750.E4AcBFFd.23362";
charset="UTF-8"
--14872766750.E4AcBFFd.23362
Date: Thu, 16 Feb 2017 20:24:35 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.freedesktop.org/
Auto-Submitted: auto-generated
https://bugs.freedesktop.org/show_bug.cgi?id=3D99843
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=3D129684&action=3Dedit
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 =3D vec4(pos, 0.0, 1.0);
}
The fragment shader:
#version 150
out vec4 outColour;
void main(void)
{
outColour =3D vec4(1.0f, 1.0f, 1.0f, 1.0f);
}
The geometry shader:
#version 150
layout(points) in;
layout(line_strip, max_vertices =3D 13) out;
uniform mat4 vpMatrix;
void main()
{
for(int i =3D 0; i < 13; i++)
{
float polygonAngle =3D (i * 30) + 90.0f;
vec4 vertexPosition =3D 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 =3D 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 =3D 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).
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--14872766750.E4AcBFFd.23362
Date: Thu, 16 Feb 2017 20:24:35 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.freedesktop.org/
Auto-Submitted: auto-generated
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 [details]
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 =3D vec4(pos, 0.0, 1.0);
}
The fragment shader:
#version 150
out vec4 outColour;
void main(void)
{
outColour =3D vec4(1.0f, 1.0f, 1.0f, 1.0f);
}
The geometry shader:
#version 150
layout(points) in;
layout(line_strip, max_vertices =3D 13) out;
uniform mat4 vpMatrix;
void main()
{
for(int i =3D 0; i < 13; i++)
{
float polygonAngle =3D (i * 30) + 90.0f;
vec4 vertexPosition =3D 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 =3D 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 =3D 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.
=
--14872766750.E4AcBFFd.23362--
--===============1390385524==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs
IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz
dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg==
--===============1390385524==--