Semantic checks: ES doesn't have unsized arrays or noise*().

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21998 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-06-13 20:16:43 +00:00
parent 3da5a3267e
commit fb7044a9a8
8 changed files with 73 additions and 43 deletions

View File

@@ -40,3 +40,11 @@ void main()
#error GL_ES is not set
#endif
}
float badsize[]; // ERROR
float[] badsize2; // ERROR
uniform ub {
int a[]; // ERROR
} ubInst[]; // ERROR
void foo(int a[]); // ERROR
float okayA[] = float[](3.0, 4.0); // Okay

View File

@@ -65,4 +65,7 @@ void main()
vec2 v16 = unpackUnorm2x16(uy);
uint u17 = packHalf2x16(v2b);
vec2 v18 = unpackHalf2x16(uy);
// not present
noise2(v18);
}

View File

@@ -1,6 +1,6 @@
#version 100
float gu[];
float gu[]; // ERROR
float g4[4];
float g5[5];
@@ -21,11 +21,6 @@ void main()
gu[2] = 4.0; // ERROR, overflow
}
gu[2] = 4.0; // okay
gu[3] = 3.0;
gu[a] = 5.0; // ERROR
g4 = foo(g5);
g5 = g4; // ERROR
gu = g4; // ERROR
@@ -36,8 +31,6 @@ void main()
if (float[4](1.0, 2.0, 3.0, 4.0) == g4) // ERROR
gu[0] = 2.0;
float u[];
u[2] = 3.0; // okay
float u[5];
u[5] = 5.0; // ERROR
foo(u); // okay

View File

@@ -120,3 +120,6 @@ sum += 0.05;
#if ((AA == BB || (AA == CC))))
#error bad6
#endif
#define PASTE(a,b) a ## b
float PASTE(tod, ay) = 17;