For all keywords already present, get correct when they could be identifiers, are reserved words, or are keywords, for all versions of ESSL and GLSL.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21282 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-04-25 16:44:03 +00:00
parent 09da79e190
commit c2ff7702be
13 changed files with 624 additions and 337 deletions

View File

@@ -63,4 +63,15 @@ void main()
f |= b; // ERROR
gl_FragColor = texture2D(s2D, centTexCoord);
float flat;
float smooth;
float noperspective;
float uvec2;
float uvec3;
float uvec4;
//packed; // ERROR, reserved word
}
float imageBuffer;
float uimage2DRect;

View File

@@ -9,6 +9,10 @@ precision highp float;
in vec4 i;
out vec4 o;
in flat float fflat;
in smooth float fsmooth;
in noperspective float fnop;
void main()
{
}

View File

@@ -21,14 +21,15 @@ uniform usampler2DArray us2DArray;
in float c1D;
in vec2 c2D;
in vec3 c3D;
in vec4 c4D;
smooth vec4 c4D;
flat in int ic1D;
flat in ivec2 ic2D;
flat in ivec3 ic3D;
flat in ivec4 ic4D;
noperspective in vec4 badv; // ERROR
in sampler2D bads; // ERROR
precision lowp uint; // ERROR
struct s {
int i;
@@ -64,4 +65,13 @@ void main()
iv = texelFetch(is2DArray, ic3D, ic1D);
iv.xy = textureSize(sCubeShadow, 2);
float precise;
double boo; // ERROR
dvec2 boo2; // ERROR
dvec3 boo3; // ERROR
dvec4 boo4; // ERROR
}
float imageBuffer; // ERROR, reserved
float uimage2DRect; // ERROR, reserved

View File

@@ -5,7 +5,7 @@ uniform mat3x3 m33;
uniform mat4x4 m44;
in vec3 v3;
in vec2 v2;
varying vec2 v2; // ERROR
in vec4 bad[10]; // ERROR

View File

@@ -43,3 +43,7 @@ void main()
pos = p * (tblock.M1 + tblock.M2 + M4 + M3 + t2m);
color = c * tblock.N1;
}
shared vec4 compute_only; // ERROR
layout(packed) uniform;

View File

@@ -9,4 +9,5 @@ void main()
{
gl_FragColor = varyingVar;
gl_FragData[1] = inVar;
int buffer = 4;
}

View File

@@ -13,7 +13,7 @@ int global_medium;
precision highp int;
precision highp ivec2; // ERROR
precision mediump int[2]; // ERROR
precision lowp uint; // ERROR
vec4 uint; // okay
precision mediump vec4; // ERROR
int global_high;

View File

@@ -23,7 +23,7 @@ int k = 0x80000000; // k gets -2147483648 == 0x80000000
int l = 2147483648; // l gets -2147483648 (the literal set the sign bit)
float fa, fb = 1.5; // single-precision floating-point
//double fc, fd = 2.0LF; // double-precision floating-point
double fc, fd = 2.0LF; // double-precision floating-point
vec2 texcoord1, texcoord2;
vec3 position;

View File

@@ -36,7 +36,7 @@
in vec3 color;
out vec4 foo;
uniform sampler2DRect bar;
uniform sampler2DArrayShadow bar;
void main()
{