Fix bug of accidentally overriding initial layout location with 0, which does not mean no location. Added in/out structure tests.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22120 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-06-21 19:43:44 +00:00
parent 211cba242b
commit b29ba33089
4 changed files with 24 additions and 4 deletions

View File

@@ -38,6 +38,16 @@ struct s {
out s badout; // ERROR
struct S2 {
vec3 c;
float f;
};
in S2 s2;
out vec3 sc;
out float sf;
void main()
{
float f;
@@ -74,6 +84,9 @@ void main()
f += gl_FragCoord.y;
gl_FragDepth = f;
sc = s2.c;
sf = s2.f;
}
float imageBuffer; // ERROR, reserved

View File

@@ -9,6 +9,13 @@ varying vec2 v2; // ERROR
in vec4 bad[10]; // ERROR
struct S {
vec3 c;
float f;
};
out S s;
void main()
{
int id = gl_VertexID + gl_InstanceID;
@@ -34,6 +41,9 @@ void main()
gl_Position = m44[2];
gl_PointSize = v2.y;
s.c = v3;
s.f = dm;
#ifdef GL_ES
#error GL_ES is set
#else