aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2013-04-23 14:26:39 -0500
committerTom Gall <tom.gall@linaro.org>2013-04-23 14:26:39 -0500
commit822869a83955eb6a50901f204ab89a957c8997e7 (patch)
treeace32e8f6dcf6a470c0a76b4288ebbdd5ff078dc
parent04b2a1668cab85b46871a1ef3994cd1a423a9e35 (diff)
Add tests/spec/glsl-es-1.00/compiler/shaders and associated
tests. These tests are a processed copy of tests/glslparsertest/shaders to support glsl es 1.00.
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CGDataTypes.frag26
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CGStandardLibrary.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/ConstantConversions.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectBuiltInOveride.frag19
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectComma.frag20
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstFolding1.vert35
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstFolding2.vert411
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstruct.vert36
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension1.V110.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension10.V110.frag24
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension4.V110.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectFull.frag266
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectFull.vert562
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectFuncOverload.frag25
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectFuncOverload.vert38
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectFunction.vert321
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectFunction1.vert37
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectMatComma.frag27
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectMatComma2.frag26
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectModule.frag62
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse1.frag50
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse2.frag134
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse2.vert149
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectParseTest.frag24
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectParseTest1.frag21
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess11.frag68
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess5.frag35
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess8.frag113
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess9.frag30
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectReservedWords.frag25
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectScalarVectorExpressions.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle1.frag22
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle1.vert16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle2.frag37
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle2.vert18
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle3.frag22
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectUnsizedArray.frag26
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectVersion.V110.frag21
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/CorrectVersion1.V110.frag17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/FunctionParam.vert22
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/IncludeDirective.frag10
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/MainParameters.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/ParseTest3.frag18
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/ParseTest4.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/TernaryOp.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/TextureRectangleSamplers.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array1.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array10.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array11.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array2.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array3.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array4.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array5.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array6.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array7.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array8.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/array9.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/attribute.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/attribute.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/attribute1.vert15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/attribute2.vert15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/break.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/comma1.vert17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/comma2.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/comma2.vert17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/comma3.vert18
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/comment.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/conditional1.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/conditional2.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/conditional3.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/constFunc.frag20
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/constructor1.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/constructor2.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/constructor3.V110.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/continue.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType1.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType10.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType11.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType12.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType13.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType19.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType2.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType3.frag21
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType4.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType5.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType6.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType7.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType8.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dataType9.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dowhile.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dvec2.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dvec3.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/dvec4.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/extension2.V110.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/extension3.V110.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/extension5.V110.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/extension6.V110.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/extension7.V110.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/extension8.V110.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/extension9.V110.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/float2.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/float3.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/float4.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly1.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly2.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly3.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly4.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function1.frag21
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function10.frag22
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function2.V110.frag20
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function3.frag21
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function4.frag21
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function5.frag20
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function6.frag21
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function7.frag20
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function8.frag21
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/function9.frag22
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/hvec2.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/hvec3.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/hvec4.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/identifier1.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/identifier2.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/identifier3.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/if1.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/if2.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/increment1.frag18
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/increment2.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/increment3.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/increment4.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/increment6.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/main1.vert12
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/main2.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/main3.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/matrix.V110.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/normal.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/parser1.vert14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/parser10.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/parser3.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/parser4.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/parser5.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/parser6.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/parser7.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/parser8.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/parser9.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/preprocess0.frag61
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/preprocess1.frag62
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/preprocess10.frag17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/preprocess2.frag58
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/preprocess3.frag41
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/preprocess4.frag58
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/preprocess6.frag32
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/preprocess7.frag49
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/scoping1.frag19
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/scoping2.frag17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct1.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct10.frag17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct11.frag17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct2.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct3.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct4.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct5.frag17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct6.frag16
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct7.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct8.frag21
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/struct9.frag17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/swizzle1.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/swizzle2.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/swizzle3.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/typecast.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/uniform.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/uniform1.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/varying.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/varying1.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/varying2.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/varying3.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/vector.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/version2.V110.frag17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/version3.V110.frag17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/vertex.vert13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly1.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly2.frag13
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/while.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/while1.frag15
-rw-r--r--tests/spec/glsl-es-1.00/compiler/shaders/while2.frag14
186 files changed, 5289 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CGDataTypes.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CGDataTypes.frag
new file mode 100644
index 00000000..a60de89d
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CGDataTypes.frag
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ half h1; // Not a basic type.
+ half2 h2; // Not a basic type.
+ half3 h3; // Not a basic type.
+ half4 h4; // Not a basic type.
+ float2 f2; // Not a basic type.
+ float3 f3; // Not a basic type.
+ float4 f4; // Not a basic type.
+ fixed fx1; // Not a basic type.
+ fixed2 fx2; // Not a basic type.
+ fixed3 fx3; // Not a basic type.
+ fixed4 fx4; // Not a basic type.
+ float3x3 f3x3; // Not a basic type.
+ float2x4 f2x4; // Not a basic type.
+ half4x4 h4x4; // Not a basic type.
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CGStandardLibrary.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CGStandardLibrary.frag
new file mode 100644
index 00000000..55f8db23
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CGStandardLibrary.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i = round(1.3); // round is not a built-in function.
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/ConstantConversions.frag b/tests/spec/glsl-es-1.00/compiler/shaders/ConstantConversions.frag
new file mode 100644
index 00000000..a96914fc
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/ConstantConversions.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f = 2; // Should be 2.0
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectBuiltInOveride.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectBuiltInOveride.frag
new file mode 100644
index 00000000..403bc601
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectBuiltInOveride.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+float radians(float f)
+{
+ return f;
+}
+
+void main()
+{
+ float f = 45.0;
+ f = radians(f);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectComma.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectComma.frag
new file mode 100644
index 00000000..f309a2b9
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectComma.frag
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ float f;
+ vec3 v;
+};
+
+void main()
+{
+ const vec4 v = (vec4(1,2,3,4), vec4(5,6,7,8)); // 5,6,7,8
+ const s s1 = (s(9.0, vec3(10,11,12)), s(13.0, vec3(14,15,16))); // 13,14,15,16
+ gl_FragColor = v + vec4(s1.f, s1.v); // 18, 20, 22, 24
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstFolding1.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstFolding1.vert
new file mode 100644
index 00000000..56e0b883
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstFolding1.vert
@@ -0,0 +1,35 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+
+ const struct s2 {
+ int i;
+ vec3 v3;
+ bvec4 bv4;
+ } s22 = s2(8, vec3(9, 10, 11), bvec4(true, false, true, false));
+
+ const struct s1 {
+ s2 ss;
+ int i;
+ float f;
+ mat4 m;
+ struct s4 {
+ int ii;
+ vec4 v4;
+ } s44;
+ } s11 = s1(s22, 2, 4.0, mat4(5), s4(6, vec4(7, 8, 9, 10))) ;
+
+ const int field3 = s11.i * s11.ss.i; // constant folding (int * int)
+ const vec4 field4 = s11.s44.v4 * s11.s44.v4; // constant folding (vec4 * vec4)
+ // 49, 64, 81, 100
+ const vec4 v4 = vec4(s11.ss.v3.y, s11.m[3][3], field3, field4[2]); // 10.0, 5.0, 16.0, 81.0
+ gl_Position = v4;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstFolding2.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstFolding2.vert
new file mode 100644
index 00000000..186b1470
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstFolding2.vert
@@ -0,0 +1,411 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const struct s {
+ int i;
+ float j;
+ struct s5 {
+ float k;
+ } s55;
+ } ss = s(4,1.0, s5(1.0));
+
+
+ const struct s2 {
+ int i;
+ vec3 v3;
+ bvec4 bv4;
+ } s22 = s2(8, vec3(9, 10, 11), bvec4(true, false, true, false));
+
+ const struct s1 {
+ s2 ss;
+ int i;
+ float f;
+ mat4 m;
+ struct s4 {
+ int ii;
+ vec4 v4;
+ } s44;
+ } s11 = s1(s22, 2, 4.0, mat4(5), s4(6, vec4(7, 8, 9, 10))) ;
+
+
+ const struct s7 {
+ int i;
+ mat3 m3;
+ } s77 = s7(12, mat3(15));
+
+ vec2 v21 = vec2(1); // Not a constant
+ const vec2 v22 = vec2(11); // 11.0, 11.0
+ const vec4 v41 = vec4(2); // 2.0, 2.0, 2.0, 2.0
+ const vec4 v43 = vec4(4,4,4,4); // 4.0, 4.0, 4.0, 4.0
+ const vec4 v44 = vec4(5.0, 5.0, 5.0, 5.0); // 5.0, 5.0, 5.0, 5.0
+ const vec4 v45 = vec4(v22, v22); // 11.0, 11.0, 11.0, 11.0
+ const vec4 v46 = vec4(vec2(20, 21), vec2(22, 23)); // 20.0, 21.0, 22.0, 23.0
+
+ const vec3 v31 = vec3(s22.v3); // 9.0, 10.0, 11.0
+ const vec3 v32 = vec3(s77.m3); // 15.0, 0, 0
+ const vec3 v33 = vec3(s77.m3[2]); // 0, 0, 15.0
+ const vec3 v34 = vec3(s77.m3[2][0]); // 0,0,0
+
+
+ const mat4 m41 = mat4(1); // 1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1
+ const mat4 m42 = mat4(v44, v44, v44, v44); // all 5s
+ const mat4 m43 = mat4( v43.x); // 4,0,0,0,0,4,0,0,0,0,0,4,0,0,0,0,0,4
+
+ const vec4 v47 = vec4(m41[0][0]); // 1.0,1.0,1.0,1.0
+
+ const mat4 m45 = mat4(s22.v3, v44, v45, v32, 50, 52); //9,10,11,5,5,5,5,11,11,11,11,15.0, 0,0, 50.0, 52.0
+ //const mat3 m31 = mat3(1, mat2(1), 2.0, vec3(1)); // 1.0, 1,0,0,1,2,1,1,1
+ const vec4 v48 = vec4(v31[0], v22[1], v41[0], v43[3]); //9, 11, 2, 4
+ const vec4 v49 = vec4(s22.v3.xy, s22.v3.zx); // 9,10,11,9
+ const vec4 v410 = vec4(v44.xy, v43.zx); //5,5,4,4
+
+ const vec4 v411 = vec4(m42[3]); // 5,5,5,5
+ const vec4 v412 = vec4(m43[2]); // 0,0,4,0
+
+ const vec2 v23 = vec2(m41); // 1,0
+
+ const vec2 v24 = vec2(33, s11.i); // 33, 2
+
+ const vec4 v413 = vec4(vec2(1.0,2.0),ivec2(3.0,4.0)); // 1,2,3,4
+ const ivec4 i41 = ivec4(1.0, 2.0, 3.0, 4.0); // 1,2,3,4
+
+ const ivec4 i42 = ivec4(6); // 6,6,6,6
+ const ivec4 i43 = ivec4(v45); //11,11,11,11
+
+ const ivec4 i44 = ivec4(v44[0]); // 5,5,5,5
+ const ivec4 i45 = ivec4(vec2(20, 21), vec2(22, 23)); // 20, 21, 22, 23
+ const vec4 v414 = vec4(ivec2(29, 30), ivec2(31, 32)); // 29.0, 30.0, 31.0, 32.0
+ const ivec4 i46 = ivec4(ivec2(2.0,3.0), ivec3(4.0,5.0,6.0));
+ const ivec4 i47 = ivec4(i46); // 2,3,4,5
+ const ivec4 i48 = ivec4(v414.x); // 29,29,29,29
+
+ const ivec4 i49 = ivec4(vec4(1)); // 1,1,1,1
+ const ivec4 i414 = ivec4(mat4(14)); // 14, 0,0,0,
+ const ivec4 i410 = ivec4(m43); // 4,0,0,0
+ const ivec4 i411 = ivec4(m43[1]); // 0, 4, 0, 0
+ const ivec4 i412 = ivec4(s77.i); // 12, 12, 12, 12
+ const ivec4 i416 = ivec4(s22.v3.zyx, 12); // 11, 10, 9, 12
+
+ const vec4 v415 = vec4(ivec2(35), ivec2(36)); // 35.0, 35.0 ,36.0 , 36.0
+
+ const bvec4 b41 = bvec4(1.0, 2.0, 3.0, 4.0); // true,true,true,true
+
+ const bvec4 b42 = bvec4(6); // true,true,true,true
+ const bvec4 b43 = bvec4(v45); //true,true,true,true
+
+ const bvec4 b44 = bvec4(v44[0]); // true,true,true,true
+ const bvec4 b45 = bvec4(vec2(0, 21), vec2(0, 1)); // false, true, false, true
+ const bvec4 b46 = bvec4(ivec2(0.0,3.0), ivec3(0,5.0,6.0)); // false, true, false, true
+ const bvec4 b47 = bvec4(i46); // true,true,true,true
+ const bvec4 b48 = bvec4(v414.x); // true,true,true,true
+
+ const bvec4 b49 = bvec4(vec4(0)); // false,false,false,false
+ const bvec4 b414 = bvec4(mat4(14)); // true, false,false,false,
+ const bvec4 b410 = bvec4(m43); // true,false,false,false
+ const bvec4 b411 = bvec4(m43[1]); // false, true, false, false
+ const bvec4 b412 = bvec4(s77.i) ; // true, true, true, true
+
+ const vec3 v35 = vec3(s11.s44.v4); // 7.0,8.0,9.0
+
+ const struct s8 {
+ int i;
+ struct s9 {
+ float f;
+ struct s10 {
+ int k;
+ } s101;
+ } s99;
+ } s88 = s8(1, s9(2.0, s10(5)));
+
+ const struct st1 {
+ int i;
+ struct st2 {
+ float f;
+ struct st3 {
+ int k;
+ int l;
+ struct st4 {
+ int m;
+ vec3 v3;
+ } st44;
+ } st33;
+ } st22;
+ } st11 = st1(1, st2(2.0, st3(5, 6, st4(7, v35))));
+
+ const vec4 v416 = vec4(s88.s99.s101.k); // all 5s
+ const vec4 v417 = vec4(st11.st22.st33.st44.v3, s88.s99.s101.k); // 7.0, 8.0, 9.0, 5.0
+ const vec3 v36 = vec3(s11.ss.v3); // 9, 10, 11
+
+ vec4 v418 = v416; // all 5s
+ const float f1 = v416[0]; // 5.0
+ vec4 v419;
+ v419.xyz = st11.st22.st33.st44.v3;
+ mat4 m47;
+
+ struct struct2 {
+ int k;
+ } struct22 = struct2(4);
+
+ const struct struct1 {
+ struct2 sst2;
+ } struct11 = struct1(struct2(2));
+
+ const vec4 v420 = v417; // 7.0, 8.0, 9.0 , 5.0
+
+ vec4 v421 = vec4(s11.m); // 5, 0, 0, 0
+ vec4 v422 = v420; // 7.0, 8.0, 9.0 , 5.0
+
+ vec4 v423 = s11.s44.v4; // 7, 8, 9, 10
+
+ int int1 = ss.i * ss.i; // 16
+ int int2 = ss.i * 2; // 8
+
+ const vec4 v425 = v420 * v420; // 49, 64, 81, 25
+ const vec4 v426 = s11.m * s11.s44.v4; // 35, 40, 45, 50
+ const vec4 v427 = s11.s44.v4 * s11.m; // 35, 40, 45, 50
+
+ float ff = 2.0;
+ const float ffConst = 2.0;
+
+ vec4 v428 = ff + v425; // ordinary assignment with binary node
+ vec3 v39 = vec3(5);
+
+ vec3 v310 = s22.v3 + v39; //14, 15, 16
+
+ const vec4 v429 = v420 + v420; // 14, 16, 18, 10
+ const vec4 v430 = v420 + ffConst; // 9, 10, 11,7
+ const vec4 v432 = v429 + s11.f; // 18, 20, 22, 14
+
+ const vec4 v433 = vec4(s11.f + s11.f); // all 8s
+ const vec4 v434 = v432 + vec4(3); // 21, 23, 25, 17
+ const mat4 m48 = s11.m + ffConst; // diagonal 7s and others 2s
+ const mat4 m49 = mat4(ffConst + s11.f); // diagonal 6s
+ const mat4 m410 = m48 + s11.f; // diagonal 11, others - 6s
+
+ const mat4 m413 = m48 + m48 ; // diagonal 14, others 4
+ const mat4 m414 = m413 + ffConst ; // diagonal 16, others 6
+
+ const vec4 v435 = ffConst + v420; // 9, 10, 11,7
+ const vec4 v436 = s11.f + v429; // 18, 20, 22, 14
+ const mat4 m415 = ffConst + s11.m; // diagonal 7s and others 2s
+ const mat4 m416 = s11.f + m48 ; // diagonal 11, others - 6s
+ const mat4 m417 = ffConst + m413 ; // diagonal 16, others 6
+
+ const vec4 v437 = v420 - v420; // 0, 0, 0, 0
+ const vec4 v438 = v420 - ffConst; // 5, 6, 7,3
+ const vec4 v440 = v429 - s11.f; // 10, 12, 14, 6
+
+ const vec4 v441 = vec4(s11.f - s11.f); // all 0s
+ const vec4 v442 = v432 - vec4(3); // 15, 17, 19, 11
+ const mat4 m418 = s11.m - ffConst; // diagonal 3s and others -2s
+ const mat4 m419 = mat4(ffConst - s11.f); // diagonal -> -2s
+ const mat4 m420 = m48 - s11.f; // diagonal 3, others -> -2
+
+ const mat4 m423 = m48 - m48 ; // All 0s
+ const mat4 m424 = m413 - ffConst ; // diagonal 12, others 2
+
+ const vec4 v443 = ffConst - v420; // -5, -6, -7,-3
+ const vec4 v444 = s11.f - v429; // -10, -12, -14, -6
+ const mat4 m425 = ffConst - s11.m; // diagonal -3s and others 2s
+ const mat4 m426 = s11.f - m48 ; // diagonal -3, others 2s
+ const mat4 m427 = ffConst - m413 ; // diagonal -12, others -2
+
+ const vec4 v445 = v420 * v420; // 49, 64, 81, 25
+ const vec4 v446 = v420 * ffConst; // 14, 16, 18,10
+ const vec4 v448 = v429 * s11.f; // 56, 46, 72, 40
+
+ const vec4 v449 = vec4(s11.f * s11.f); // all 16
+ const vec4 v450 = v432 * vec4(3); // 54, 60, 66, 42
+ const mat4 m428 = s11.m * ffConst; // diagonal 10 and others 0s
+ const mat4 m429 = mat4(ffConst * s11.f); // diagonal 8
+ const mat4 m430 = m48 * s11.f; // diagonal 28, others 8
+
+ const mat4 m433 = m48 * m48 ; // diagonal 61, others 36
+ const mat4 m434 = m413 * ffConst ; // diagonal 28, others 8
+
+ const vec4 v451 = ffConst * v420; // 14, 16, 18,10
+ const vec4 v452 = s11.f * v429; // 56, 64, 72, 40
+ const mat4 m435 = ffConst * s11.m; // diagonal 10 and others 0s
+ const mat4 m436 = s11.f * m48 ; // diagonal 28, others - 8s
+ const mat4 m437 = ffConst * m413 ; // diagonal 28, others 8
+
+ const vec4 v453 = v420 / v420; // 1, 1, 1, 1
+ const vec4 v454 = v420 / ffConst; // 3.5, 4, 4.5,2.5
+
+ const vec4 v457 = vec4(s11.f / s11.f); // all 1s
+ const vec4 v458 = v432 / vec4(3); // 6, 6.6666, 7.333, 4.6666
+ const mat4 m438 = s11.m / ffConst; // diagonal 2.5 and others 0s
+ const mat4 m439 = mat4(ffConst / s11.f); // diagonal 0.5s
+ const mat4 m440 = m48 / s11.f; // diagonal 1.75, others 0.5s
+
+ const mat4 m443 = m48 / m48 ; // All 1s
+ const mat4 m444 = m413 / ffConst ; // diagonal 7, others 2
+
+ const vec4 v459 = ffConst / v420; // .2857 , .25, .22, .4
+ const vec4 v460 = s11.f / v429; // .2857, .25, .22, .4
+ //const mat4 m445 = ffConst / s11.m; // divide by zero error
+ const mat4 m446 = s11.f / m48 ; // diagonal .571, others 2
+ const mat4 m447 = ffConst / m413 ; // diagonal .1428, others 0.5
+
+ const vec4 v461 = v453 * m428; // 10, 10, 10, 10
+ const vec4 v462 = v453 * m437; // 52, 52, 52, 52
+ const vec4 v463 = m428 * v451; // 140, 160, 180, 100
+ const vec4 v464 = m437 * v451; // 744, 784, 824, 664
+
+ int ii = 2;
+ const int iiConst = 2;
+
+ const ivec4 i420 = ivec4( 7,8,9,5); // 7, 8, 9, 5
+
+ const ivec4 i429 = i420 + i420; // 14, 16, 18, 10
+ const ivec4 i430 = i420 + iiConst; // 9, 10, 11,7
+ const ivec4 i432 = i429 + ss.i; // 18, 20, 22, 14
+
+ const ivec4 i433 = ivec4(ss.i + ss.i); // all 8s
+
+ const ivec4 i435 = iiConst + i420; // 9, 10, 11,7
+ const ivec4 i436 = ss.i + i429; // 18, 20, 22, 14
+
+ const ivec4 i437 = i420 - i420; // 0, 0, 0, 0
+ const ivec4 i438 = i420 - iiConst; // 5, 6, 7,3
+ const ivec4 i440 = i429 - ss.i; // 10, 12, 14, 6
+
+ const ivec4 i441 = ivec4(ss.i - ss.i); // all 0s
+
+ const ivec4 i443 = iiConst - i420; // -5, -6, -7,-3
+ const ivec4 i444 = ss.i - i429; // -10, -12, -14, -6
+
+ const ivec4 i445 = i420 * i420; // 49, 64, 81, 25
+ const ivec4 i446 = i420 * iiConst; // 14, 16, 18,10
+ const ivec4 i448 = i429 * ss.i; // 56, 64, 72, 40
+
+ const ivec4 i449 = ivec4(ss.i * ss.i); // all 16
+
+ const ivec4 i451 = iiConst * i420; // 14, 16, 18,10
+ const ivec4 i452 = ss.i * i429; // 56, 64, 72, 40
+
+ const ivec4 i453 = i420 / i420; // 1, 1, 1, 1
+ const ivec4 i454 = i420 / iiConst; // 3, 4, 4,2
+ const ivec4 i456 = i429 / ss.i; // 3, 4, 4, 2
+
+ const ivec4 i457 = ivec4(ss.i / ss.i); // all 1s
+
+ const ivec4 i459 = iiConst / i420; // 0 , 0, 0,0
+ const ivec4 i460 = ss.i / i429; // 0, 0, 0,0
+
+ const bvec4 b424 = bvec4(s22.bv4);
+
+ const bool b1 = s22.bv4 == b424; // true
+ const bool b2 = i420 == i420; // true
+ const bool b3 = i420 == i445; // false
+ const bool b4 = v420 == v420; // true
+ const bool b5 = m430 == m434; // true
+
+ const vec4 v465 = -v420; // -7, -8, -9, -5
+ const mat4 m448 = -m447 ; // diagonal -.1428, others -0.5
+ const ivec4 i465 = -i456 ; // -3, -4, -4,-2
+
+ const bool b7 = s22 == s22;
+
+ const vec4 v466 = v432 + vec4(3,4,5,6); // 21, 24, 27, 20
+ const vec4 v467 = v432 + vec4(vec2(3,4),5,6); // 21, 24, 27, 20
+ const vec4 v468 = v432 + vec4(3, vec2(4, 5),vec2(6,7)); // 21, 24, 27, 20
+ const vec4 v469 = vec4(v468) + vec4(3) + v468 + vec4(s77.m3[2][0]); // 45, 51, 57, 43
+
+ const bool b8 = ss == ss; // true
+
+ struct st5 {
+ int i;
+ float f;
+ struct st6 {
+ vec3 v;
+ } st66;
+ } st55;
+
+ const st5 st551 = st5(2, 4.0, st6(vec3(7)));
+ const st5 st552 = st5(2, 4.0, st6(vec3(7)));
+
+ const bool b10 = st551 == st552; // true
+
+ const bool b11 = st551.st66 == st552.st66; // true
+
+ const st5 st553 = st5(2, 4.0, st6(vec3(8)));
+
+ const bool b12 = st551.st66 == st553.st66; // false
+ const bool b13 = st551 == st553; // false
+
+ const bool b14 = st551 != st552; // false
+ const bool b15 = st551.st66 != st552.st66; // false
+ const bool b16 = st551.st66 != st553.st66; // true
+ const bool b17 = st551 != st553; // true
+
+ const bool b18 = s22.bv4 != b424; // false
+ const bool b19 = i420 != i420; // false
+ const bool b20 = i420 != i445; // true
+ const bool b21 = v420 != v420; // false
+ const bool b22 = m430 != m434; // false
+
+ const int int10 = i420.xy.y; // 8
+
+ //float f = v470.x;
+
+
+
+ const int int13 = -ss.i;
+
+ const vec4 v474 = -vec4(0.5);
+
+ int int14 = ii++;
+ int array[3];
+ array[2];
+
+ const vec4 v478 = v466 * 2.0; // 42, 48, 54, 40
+
+ const vec4 v479 = iiConst > 1 ? v466 : v478; // 21, 24, 27, 20
+
+ const struct st7 {
+ int i;
+ bool b;
+ } st77 = st7(ss.i, true);
+
+ const vec4 v481 = vec4(st77.i);
+
+ const struct st8 {
+ int i;
+ } ;
+
+
+ const struct st9 {
+ s2 ss;
+ } st99 = st9(s22);
+
+ const vec3 v312 = st99.ss.v3; // 9, 10, 11
+ const vec4 v482 = mat4(1)[0]; // 1, 0, 0 , 0
+
+ const mat4 m450 = mat4(ss.i); // mat4(4)
+ const mat4 m451 = mat4(b20); // mat4(1)
+ const mat4 m452 = mat4(st77.b); // mat4(1)
+
+ const vec4 v483 = vec4(vec4(3).x); // 3,3,3,3
+ const mat4 m453 = mat4(vec4(5).x); // mat5(5)
+
+ const vec4 v484 = vec4(mat4(6)[1]); // 0,6,0,0
+ const mat4 m454 = mat4(mat4(6)[1][1]); // mat4(6)
+
+ const vec4 v485 = vec4(st7(8, true).b); // 1,1,1,1
+
+ const vec4 v487 = vec4(vec4(12, 13, 14, 15).wy, 12, 14);
+
+ int i20 = ss.i;
+ const vec4 v489 = -vec4(7,8,9,5); // -7, -8, -9, -5
+
+ gl_Position = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstruct.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstruct.vert
new file mode 100644
index 00000000..6b5d8026
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectConstruct.vert
@@ -0,0 +1,36 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ float f;
+} s1 = s(1.0);
+
+struct s2 {
+ float f;
+ struct s3 {
+ int i;
+ } s3Inst;
+} s2Inst = s2(1.0, s3(1));
+
+void main()
+{
+ vec3 i = vec3(5.0, 4.0, ivec2(2.0, 1.0));
+ ivec4 v2 = ivec4(1.0);
+ vec4 v4 = vec4(v2);
+ bvec4 v5 = bvec4(v2);
+ vec3 v6 = vec3(v5);
+ vec3 v = vec3(2, 2.0, 1);
+ vec3 v1 = vec3(1.2, v);
+
+ mat3 m1 = mat3(v,v,v);
+ mat2 m2 = mat2(v, v6.x);
+
+ gl_Position = vec4(1.0);
+}
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension1.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension1.V110.frag
new file mode 100644
index 00000000..96f4c3ab
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension1.V110.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#extension all : disable // no error in the program
+#extension all : warn // no error in the program
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension10.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension10.V110.frag
new file mode 100644
index 00000000..d47444c7
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension10.V110.frag
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#version 110
+#extension extensionfoo : enable // warning extension not supported
+#extension extensionfoo : disable // warning extension not supported
+#extension extensionfoo : warn // warning extension not supported
+
+#extension all : disable // no error in the program
+#extension all : warn // no error in the program
+
+#extension extensionfoo : enable // warning extension not supported
+#extension extensionfoo : disable // warning extension not supported
+#extension extensionfoo : warn // warning extension not supported
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension4.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension4.V110.frag
new file mode 100644
index 00000000..1caaccf2
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectExtension4.V110.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#extension extensionfoo : enable // warning extension not supported
+#extension extensionfoo : disable // warning extension not supported
+#extension extensionfoo : warn // warning extension not supported
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFull.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFull.frag
new file mode 100644
index 00000000..81749fef
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFull.frag
@@ -0,0 +1,266 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void test_function(in int in_int, inout int out_int);
+int test_function1(in int in_int, inout int out_int);
+
+uniform float array_float[2];
+
+struct light1
+{
+ float intensity;
+ vec3 position;
+ int test_int[2];
+ struct
+ {
+ int a;
+ float f;
+ } light2;
+} lightVar;
+
+struct light3 {
+ int i;
+} ;
+
+uniform float flt_uniform;
+uniform vec3 uniform_vec3;
+uniform mat3 uniform_mat3;
+
+varying vec3 varying_vec3;
+varying vec2 varying_vec2;
+varying vec4 varying_vec4;
+varying mat4 varying_mat4;
+varying mat2 varying_mat2;
+varying mat3 varying_mat3;
+varying float varying_flt;
+
+
+float frequencies[2];
+
+void test_function2(int func_int)
+{
+ return;
+}
+
+const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
+const bool BoolConst1 = true && true || false;
+const bool BoolConst2 = false || !false && false;
+
+void main(void)
+{
+
+ bool test_bool5 = 1.2 > 3.0 ;
+
+ int test_int1 = 42;
+ int test_int2 = 047;
+ int test_int4 = 0xa8; // testing for hexadecimal numbers
+ int test_int5 = 0xa8F; // testing for hexadecimal numbers
+
+ float test_float1 = 1.5;
+ float test_float2 = .01;
+ float test_float3 = 10.;
+ float test_float4 = 10.01;
+ float test_float5 = 23e+2;
+ float test_float6 = 23E-3;
+ float test_float8 = 23E2;
+ bool test_bool6 = BoolConst1 && ! (test_int1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0.0) && (FloatConst1 != 0.0) && (test_float1 != 0.0);
+
+ vec4 color = vec4(0.0, 1.0, 0.0, 1.0);
+ vec4 color2 = vec4(0.0);
+
+ vec3 color4 = vec3(test_float8);
+
+ ivec4 test_int_vect1 = ivec4(1.,1.,1.,1.);
+ bvec4 test_bool_vect1 = bvec4(1., 1., 1. , 1. );
+
+ vec2 test_vec2 = vec2(1., 1.);
+ vec2 test_vec3 = vec2(1., 1);
+
+ vec2 test_vec5 = vec2(color4);
+ vec3 test_vec7 = vec3(color);
+ vec3 test_vec8 = vec3(test_vec2, test_float4);
+ vec3 test_vec9 = vec3(test_float4, test_vec2);
+
+ vec4 test_vec10 = vec4(test_vec9, 0.01);
+ vec4 test_vec11 = vec4(0.01, test_vec9);
+
+ vec4 test_vec12 = vec4(test_vec2, test_vec2);
+
+ mat2 test_mat2 = mat2(test_float3);
+ mat3 test_mat3 = mat3(test_float3);
+ mat4 test_mat4 = mat4(test_float3);
+
+ mat2 test_mat7 = mat2(test_vec2, test_vec2);
+ mat2 test_mat8 = mat2(01.01, 2.01, 3.01, 4.01);
+
+ mat3 test_mat9 = mat3(test_vec7, test_vec7, test_vec7);
+ mat4 test_mat10 = mat4(test_vec10, test_vec10, test_vec10, test_vec10);
+
+ mat2 test_mat12 = mat2(test_vec2, 0.01, 0.01);
+ mat2 test_mat13 = mat2(0.01, 5., test_vec2);
+ mat2 test_mat14 = mat2(1, 5., test_vec2);
+ mat2 test_mat15 = mat2(0.1, 5., test_vec2 );
+
+
+ float freq1[2];
+ float freq2[];
+
+ const int const_int = 5;
+
+ int out_int;
+ test_function(test_int1, test_int1);
+ test_function(test_int1, out_int);
+ bool bool_var = true;
+ int test_int6 = int(bool_var);
+ test_float1 = float(bool_var);
+ test_float1 = float(test_int6);
+ test_int6 = int(test_float1);
+ bool_var = bool(test_int6);
+ bool_var = bool(test_float1);
+ test_float1 = float(test_vec9);
+
+ test_vec2.x = 1.2;
+ test_vec2.y = 1.4;
+ test_vec2.xy;
+
+ color.rgba;
+
+ test_vec2[0] = 1.1;
+
+ test_mat2[0][0] = 1.1;
+
+ test_float1 += 1.0;
+ test_float1 -= 1.0;
+ test_float1 *= 1.0;
+ test_float1 /= 1.0;
+
+ test_mat12 *= test_mat13 ;
+ test_mat12 *= test_float1;
+ test_vec2 *= test_float1;
+ test_vec2 *= test_mat12;
+ test_float1++;
+ test_float1--;
+ --test_float1;
+ ++test_float1;
+ test_float1;
+
+ test_mat12 = test_mat12 * test_mat13;
+ test_vec2 = test_vec2 * test_vec5;
+
+ test_vec2++;
+ test_mat2++;
+
+ test_float1 = 1.0;
+
+ bool test_bool2 = test_float2 > test_float3;
+ test_bool2 = test_float2 > test_float3;
+
+ test_bool2 = test_int1 > test_int6 ;
+ bool test_bool3, test_bool4;
+
+ test_bool2 = test_bool3 && test_bool4;
+ test_bool2 = test_bool3 || test_bool4;
+ test_bool2 = test_bool3 ^^ test_bool4;
+
+ test_bool2 = !test_bool3;
+
+ test_bool3 = !(test_int1 > test_int6) ;
+
+ test_float1 = test_int1 > test_int6 ? test_float2 : test_float3;
+ test_vec2 = test_int1 > test_int6 ? test_vec2 : test_vec5;
+ if(test_bool2)
+ test_float1++;
+ else
+ test_float1--;
+
+ if(test_float1 > test_float2)
+ test_float1++;
+
+ if( test_bool2 )
+ {
+ int if_int;
+ test_float1++;
+ }
+
+ if(test_bool2)
+ if(test_bool3)
+ if(test_bool3)
+ test_float1++;
+
+ for(int for_int=0; for_int < 5; for_int++)
+ {
+ }
+
+
+ for(; test_bool2; )
+ {
+ int for_int;
+ }
+
+ for(; test_bool2 = (test_float1 > test_float2); )
+ {
+ }
+
+ for(int for_int1; test_bool2; )
+ {
+ int for_int;
+ }
+
+ for(; test_bool2; test_float1++)
+ {
+ int test_float;
+ }
+
+ while(bool b = (test_float1 > test_float2))
+ {
+ break;
+ continue;
+ }
+
+ while( test_bool2 )
+ {
+ break;
+ }
+
+ do {
+ int dowhile_int;
+ dowhile_int = 3;
+ } while(test_bool2);
+
+ if(test_float1 < 2.2)
+ discard;
+
+ // FRAGMENT SHADER ONLY VARIABLES
+ gl_FragColor = vec4(2.0, 3.0, 1.0, 1.1);
+
+ color = gl_FragCoord ;
+ gl_FragDepth = 1.0;
+
+ test_bool2 = gl_FrontFacing ;
+
+
+
+ // VARYING VARIABLES AVAILABLE IN FRAGMENT AND VERTEX SHADERS BOTH
+ color = gl_TexCoord[0];
+ float builtInF = gl_FogFragCoord;
+}
+
+void test_function(in int in_int, inout int out_int)
+{
+ out_int = in_int;
+ int i = 5;
+}
+varying float var_flt ;
+
+int test_function1(int in_int, inout int out_int)
+{
+ float ff;
+ ff = var_flt;
+ return int(ff);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFull.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFull.vert
new file mode 100644
index 00000000..c0e43d3c
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFull.vert
@@ -0,0 +1,562 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void test_function(const in int in_int, inout int out_int);
+int test_function1(in int in_int, inout int out_int);
+
+int test_function1(in int in_int1, inout int , out int);
+int test_function1(in int in_int1, inout int , out int);
+
+uniform float array_float[2];
+
+struct light1
+{
+ float intensity;
+ vec3 position;
+ int test_int[2];
+ struct nested
+ {
+ int a;
+ float f;
+ } light2;
+} lightVar;
+light1 ll2;
+
+varying struct light3 {
+ float i;
+} ;
+
+attribute struct light4 {
+ float i;
+};
+
+struct light5 {
+ float i ;
+ float a[2];
+} light5_inst;
+
+uniform light3 uniformLight3;
+
+uniform struct light6 {
+ float i;
+};
+uniform light6 uniformLight6;
+
+
+struct light7 {
+ struct {
+ struct {
+ struct {
+ float f;
+ } light10;
+ } light9;
+ } light8;
+} ;
+
+
+light3 struct_var = light3(5.0);
+
+// Attribtue variables can only be Global
+attribute float flt_attrib;
+attribute vec2 vec2_attrib;
+attribute vec3 vec3_attrib;
+attribute vec4 vec4_attrib;
+attribute mat2 mat2_attrib;
+attribute mat3 mat3_attrib;
+attribute mat4 mat4_attrib;
+
+uniform float flt_uniform;
+uniform vec3 uniform_vec3;
+uniform mat3 uniform_mat3;
+
+uniform sampler1D samp[];
+uniform sampler1D samp1;
+
+const struct light12 {
+ int a;
+} uniform_struct = light12(2);
+
+varying vec3 varying_vec3;
+varying vec2 varying_vec2;
+varying vec4 varying_vec4;
+varying mat4 varying_mat4;
+varying mat2 varying_mat2;
+varying mat3 varying_mat3;
+varying float varying_flt;
+
+float frequencies[2];
+
+void test_function2(int func_int)
+{
+}
+
+void test_function3(light3);
+void test_function4(light5 ll20);
+void test_function5(light1);
+light6 test_function6(int a);
+
+const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
+const bool BoolConst1 = true && true || false;
+const bool BoolConst2 = false || !false && false;
+
+void main(void)
+{
+
+ int test_int1 = 42;
+
+ struct structMain {
+ float i;
+ } testStruct;
+
+ struct {
+ structMain a;
+ } aStruct;
+
+ testStruct.i = 5.0 ;
+ struct_var.i = 5.0;
+
+ structMain newStruct, newStruct1;
+ testStruct = newStruct;
+ newStruct = newStruct1;
+
+ lightVar.light2.f = 1.1;
+
+ light1 ll1;
+ ll1.light2.a = 1;
+
+ const struct const_struct {
+ float i;
+ } const_struct_inst = const_struct(1.0);
+
+ ll1 = ll2;
+ ll1.light2 = ll2.light2;
+ ll1.light2 = ll1.light2;
+ ll1.light2.f = ll2.light2.f;
+ ll1.light2.f = ll1.light2.f;
+
+ lightVar = ll2;
+ ll2 = lightVar;
+
+ light5 ll10;
+
+ light7 ll7[];
+ structMain newStruct2[2];
+ newStruct2[0].i = 1.1;
+
+ ll7[0].light8.light9.light10.f = 1.1;
+
+
+ bool test_bool4 = false ;
+
+ bool test_bool5 = 1.2 > 3.0 ;
+
+ int test_int2 = 047;
+ int test_int4 = 0xa8; // testing for hexadecimal numbers
+
+ float test_float1 = 1.5;
+ float test_float2 = .01;
+ float test_float3 = 10.;
+ float test_float4 = 10.01;
+ float test_float5 = 23e+2;
+ float test_float6 = 23E-3;
+ float test_float8 = 23E2;
+ bool test_bool6 = BoolConst1 && ! (test_int1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0.0) && (FloatConst1 != 0.0) && (test_float1 != 0.0);
+
+ vec4 color = vec4(0.0, 1.0, 0.0, 1.0);
+ vec4 color2 = vec4(0.0);
+
+ vec3 color4 = vec3(test_float8);
+
+ ivec4 test_int_vect1 = ivec4(1.0,1.0,1.0,1.0);
+ ivec3 test_int_vec3 = ivec3(1, 1, 1) ;
+
+ bvec4 test_bool_vect1 = bvec4(1., 1., 1. , 1. );
+
+ vec2 test_vec2 = vec2(1., 1.);
+ vec2 test_vec3 = vec2(1., 1);
+ vec4 test_vec4 = vec4(test_int_vect1);
+
+ vec2 test_vec5 = vec2(color4);
+ vec3 test_vec7 = vec3(color);
+ vec3 test_vec8 = vec3(test_vec2, test_float4);
+ vec3 test_vec9 = vec3(test_float4, test_vec2);
+
+ vec4 test_vec10 = vec4(test_vec9, 0.01);
+ vec4 test_vec11 = vec4(0.01, test_vec9);
+
+ vec4 test_vec12 = vec4(test_vec2, test_vec2);
+
+ mat2 test_mat2 = mat2(test_float3);
+ mat3 test_mat3 = mat3(test_float3);
+ mat4 test_mat4 = mat4(test_float3);
+
+ mat2 test_mat7 = mat2(test_vec2, test_vec2);
+ mat2 test_mat8 = mat2(01.01, 2.01, 3.01, 4.01);
+
+ mat3 test_mat9 = mat3(test_vec7, test_vec7, test_vec7);
+ mat4 test_mat10 = mat4(test_vec10, test_vec10, test_vec10, test_vec10);
+ test_mat10[1] = test_vec10;
+
+
+ mat2 test_mat12 = mat2(test_vec2, 0.01, 0.01);
+ mat2 test_mat13 = mat2(0.01, 5., test_vec2);
+ mat2 test_mat15 = mat2(0.1, 5., test_vec2 );
+
+ //mat2 test_mat16 = mat2(test_mat9);
+ //mat2 test_mat17 = mat2(test_mat10);
+
+ float freq1[2];
+ float freq2[];
+
+ while(test_float1 < 1.0);
+
+ float freq2[];
+ float freq2[25];
+ freq2[1] = 1.9 ;
+ const int array_index = 2;
+ freq2[test_int1] = 1.9 ;
+ freq2[array_index] = 1.8;
+
+ const int const_int = 5;
+
+ test_float1 = varying_flt;
+
+ int out_int;
+ int intArray[];
+ test_function(test_int1, test_int1);
+ test_function(test_int1, intArray[2]);
+
+ vec3 vv = vec3(test_function1(test_int1, out_int));
+ bool bool_var = true;
+ int test_int6 = int(bool_var);
+ test_float1 = float(bool_var);
+ test_float1 = float(test_int6);
+ test_int6 = int(test_float1);
+ bool_var = bool(test_int6);
+ bool_var = bool(test_float1);
+ test_float1 = float(test_vec9);
+
+ test_vec2.x = 1.2;
+ test_vec2.y = 1.4;
+ test_vec2.xy;
+
+
+ color.zy = test_vec2;
+
+ test_vec2[1] = 1.1;
+
+ test_mat2[0][0] = 1.1;
+
+ test_float1 += 1.0;
+ test_float1 -= 1.0;
+ test_float1 *= 1.0;
+ test_float1 /= 1.0;
+
+ test_mat12 *= test_mat13 ;
+ test_mat12 *= test_float1;
+ test_vec2 *= test_float1;
+ test_vec2 *= test_mat12;
+ test_float1++;
+ test_float1--;
+ --test_float1;
+ ++test_float1;
+ test_float1;
+ test_int1++;
+ test_int1--;
+
+ test_vec2 = test_vec2 + test_float1;
+ test_vec2 = test_float1 + test_vec2;
+
+ test_mat12 = test_mat12 * test_mat13;
+ test_vec2 = test_vec2 * test_vec5;
+
+ test_vec2++;
+ test_mat2++;
+
+ bool test_bool2 = test_float2 > test_float3;
+
+ bool test_bool3 = test_int1 > test_int6 ;
+
+ test_bool3 = test_vec2 == test_vec5;
+
+ test_bool2 = test_bool3 && test_bool4;
+ test_bool2 = test_bool3 || test_bool4;
+ test_bool2 = test_bool3 ^^ test_bool4;
+
+ test_bool2 = !test_bool3;
+
+ test_bool3 = !(test_int1 > test_int6) ;
+
+ test_float1 = test_int1 > test_int6 ? test_float2 : test_float3;
+ test_vec2 = test_int1 > test_int6 ? test_vec2 : test_vec5;
+ if(test_bool2)
+ test_float1++;
+ else
+ test_float1--;
+
+ if(test_float1 > test_float2)
+ test_float1++;
+
+ if( test_bool2 )
+ {
+ int if_int;
+ test_float1++;
+ }
+
+ if(test_bool2)
+ if(test_bool3)
+ if(test_bool3)
+ test_float1++;
+
+ for(int for_int=0; for_int < 5; for_int++)
+ {
+ // do nothing as such
+ }
+
+
+ for(; test_bool2; )
+ {
+ int for_int;
+ }
+
+ for(; test_bool2 = (test_float1 > test_float2); )
+ {
+ }
+
+ for(int for_int1; test_bool2; )
+ {
+ int for_int;
+ }
+
+ for(; test_bool2; test_float1++)
+ {
+ int test_float;
+ }
+
+ while(bool b = (test_float1 > test_float2))
+ {
+ break;
+ continue;
+ }
+
+
+ for(;;) {
+ for(;;)
+ {
+ break;
+ }
+ }
+
+
+ while( test_bool2 )
+ {
+ break;
+ }
+
+ do {
+ int dowhile_int;
+ dowhile_int = 3;
+ } while(test_bool2);
+
+
+ // VERTEX SHADER ONLY VARIABLES
+ gl_PointSize = 4.0;
+ gl_ClipVertex = vec4(2.0, 3.0, 1.0, 1.1);
+
+ gl_Position = vec4(2.0, 3.0, 1.0, 1.1);
+ gl_Position = gl_Vertex;
+
+
+ // VERTEX SHADER BUILT-IN ATTRIBUTES
+
+ vec4 builtInV4 = gl_Color + gl_SecondaryColor + gl_Vertex + gl_MultiTexCoord0 + gl_MultiTexCoord1 + gl_MultiTexCoord2 + gl_MultiTexCoord3 + gl_MultiTexCoord4 + gl_MultiTexCoord5 + gl_MultiTexCoord6 + gl_MultiTexCoord7;
+
+
+ int builtInI = gl_MaxLights + gl_MaxClipPlanes + gl_MaxTextureUnits + gl_MaxTextureCoords + gl_MaxVertexAttribs + gl_MaxVertexUniformComponents + gl_MaxVaryingFloats + gl_MaxVertexTextureImageUnits + gl_MaxCombinedTextureImageUnits + gl_MaxTextureImageUnits + gl_MaxFragmentUniformComponents + gl_MaxDrawBuffers ;
+
+
+ mat4 builtInM4 = gl_ModelViewMatrix + gl_ModelViewProjectionMatrix + gl_ProjectionMatrix;
+
+ gl_NormalMatrix;
+
+ gl_TextureMatrix[gl_MaxTextureCoords-1];
+ gl_TextureMatrix;
+ gl_NormalScale ;
+
+ gl_DepthRange.near ;
+
+ test_float1 = gl_DepthRange.near;
+ test_float1 = gl_DepthRange.far;
+ test_float1 = gl_DepthRange.diff;
+
+ gl_ClipPlane[gl_MaxClipPlanes-1] ;
+
+ gl_Point.size;
+ gl_Point.sizeMin;
+ gl_Point.sizeMax;
+ gl_Point.fadeThresholdSize ;
+ gl_Point.distanceConstantAttenuation;
+ gl_Point.distanceLinearAttenuation ;
+ gl_Point.distanceQuadraticAttenuation;
+
+ gl_MaterialParameters test;
+ gl_FrontMaterial.emission;
+
+ color = gl_FrontMaterial.emission;
+ color = gl_FrontMaterial.ambient;
+ color = gl_FrontMaterial.diffuse;
+ color = gl_FrontMaterial.specular;
+ test_float1 = gl_FrontMaterial.shininess;
+
+ gl_LightSourceParameters lightSource;
+
+ float builtInFloat1 = gl_LightSource[0].spotExponent;
+ color = gl_LightSource[0].ambient;
+ color = lightSource.ambient;
+ color = lightSource.diffuse;
+ color = lightSource.specular;
+ color = lightSource.position;
+ color = lightSource.halfVector;
+ color4 = lightSource.spotDirection;
+ test_float1 = lightSource.spotExponent;
+ test_float1 = lightSource.spotCutoff;
+ test_float1 = lightSource.spotCosCutoff;
+ test_float1 = lightSource.constantAttenuation;
+ test_float1 = lightSource.linearAttenuation;
+ test_float1 = lightSource.quadraticAttenuation;
+
+ color = gl_LightModel.ambient;
+
+ gl_LightModelParameters lightModel;
+ color = gl_LightModel.ambient;
+ color = lightModel.ambient;
+
+ color = gl_FrontLightModelProduct.sceneColor ;
+
+ gl_LightModelProducts lightModelProd;
+
+ color = lightModelProd.sceneColor;
+ color = gl_FrontLightModelProduct.sceneColor;
+
+ color = gl_FrontLightProduct[0].ambient;
+ color = gl_FrontLightProduct[0].ambient;
+ gl_LightProducts lightProd;
+
+ color = lightProd.ambient;
+ color = lightProd.diffuse;
+ color = lightProd.specular;
+
+
+ color = gl_TextureEnvColor[gl_MaxTextureUnits-1];
+
+ color = gl_EyePlaneS[gl_MaxTextureCoords-1] ;
+
+ color = gl_EyePlaneT[gl_MaxTextureCoords-1];
+
+ color = gl_EyePlaneR[gl_MaxTextureCoords-1];
+
+ color = gl_EyePlaneQ[gl_MaxTextureCoords-1];
+
+ color = gl_ObjectPlaneS[gl_MaxTextureCoords-1];
+
+ color = gl_ObjectPlaneT[gl_MaxTextureCoords-1] ;
+
+ color = gl_ObjectPlaneR[gl_MaxTextureCoords-1];
+
+ color = gl_ObjectPlaneQ[gl_MaxTextureCoords-1];
+
+ test_float1 = gl_Fog.density ;
+ test_float1 = gl_Fog.start ;
+ test_float1 = gl_Fog.end ;
+ test_float1 = gl_Fog.scale ;
+ color = gl_Fog.color ;
+
+ gl_FrontColor = vec4(1.0, 1.0, 1.0, 1.0);
+ gl_BackColor = vec4(1.0, 1.0, 1.0, 1.0);
+ gl_FrontSecondaryColor = vec4(1.0, 1.0, 1.0, 1.0);
+ gl_BackSecondaryColor = vec4(1.0, 1.0, 1.0, 1.0);
+
+
+ // VARYING VARIABLES AVAILABLE IN FRAGMENT AND VERTEX SHADERS BOTH
+ gl_TexCoord[0] = vec4(1.0, 1.0, 1.0, 1.0);
+ gl_FogFragCoord = 1.0;
+
+}
+
+void test_function(const in int in_int, inout int out_int)
+{
+ out_int = 5;
+ int i = 5;
+ return ;
+}
+
+int test_function1(in int in_int1, inout int unused1, out int unused2)
+{
+ float ff;
+ in_int1 = 5;
+ return in_int1;
+}
+
+void test_function3(light3 ll)
+{
+ ll.i = 5.0;
+ varying_flt = 1.2;
+}
+
+void test_function4(light5 ll20)
+{
+ ll20.i = 10.0;
+}
+
+void test_function5(light1 struct_light1)
+{
+ struct_light1.light2.a = 1;
+ light5 ll5;
+ struct_light1.light2.f = ll5.i;
+ struct_light1.light2.f++;
+ struct_light1.light2.a++;
+}
+
+light6 test_function6(int a)
+{
+ int x;
+ light6 funcStruct;
+ light7 funcStruct1;
+ -x;
+ x = x - x ;
+ mat2 m;
+ m++;
+ -m;
+ (m)++;
+ return funcStruct;
+}
+
+float test_function7(light1 ll1, int light1 )
+{
+ float f;
+
+ struct ss1 {
+ int a;
+ };
+
+ for(;;) {
+ for(;;) {
+ if(true)
+ break;
+ if(true)
+ break;
+ if(true)
+ break;
+ }
+ break;
+ }
+
+ for(;;);
+ return float(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFuncOverload.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFuncOverload.frag
new file mode 100644
index 00000000..414f6d74
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFuncOverload.frag
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void testVoid (vec4 v, vec4 v1)
+{
+}
+
+void testVoid (ivec4 v, ivec4 v1)
+{
+}
+
+void main(void)
+{
+ vec4 v;
+ ivec4 i;
+ testVoid(i, i);
+ testVoid(v, v);
+ gl_FragColor = v;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFuncOverload.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFuncOverload.vert
new file mode 100644
index 00000000..c1438d1c
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFuncOverload.vert
@@ -0,0 +1,38 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct S2
+{
+ float f;
+};
+
+struct S1
+{
+ float f;
+ S2 s2;
+};
+
+float process(S1 s1);
+float process(S2 s2);
+
+void main()
+{
+ S1 s1 = S1(1.0, S2(1.0));
+ gl_Position = vec4(process(s1));
+}
+
+float process(S1 s1)
+{
+ return s1.f + process(s1.s2);
+}
+
+float process(S2 s2)
+{
+ return s2.f;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFunction.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFunction.vert
new file mode 100644
index 00000000..8da5ce1a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFunction.vert
@@ -0,0 +1,321 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform sampler1D sampler;
+uniform sampler2D sampler2;
+uniform sampler3D sampler3;
+uniform samplerCube samplerc;
+uniform sampler1DShadow sampler1dshadow;
+uniform sampler2DShadow sampler2dshadow;
+
+void main(void)
+{
+ float float1;
+ vec2 test_vec2;
+ vec3 test_vec3;
+ vec4 test_vec4;
+ bvec2 test_bvec2;
+ bvec3 test_bvec3;
+ bvec4 test_bvec4;
+ ivec2 test_ivec2;
+ ivec3 test_ivec3;
+ ivec4 test_ivec4;
+ bool test_bool;
+
+ float1 = radians(45.0);
+ test_vec2 = radians(test_vec2);
+ test_vec3 = radians(test_vec3);
+ test_vec4 = radians(test_vec4);
+
+ float1 = degrees(float1);
+ test_vec2 = degrees(test_vec2);
+ test_vec3 = degrees(test_vec3);
+ test_vec4 = degrees(test_vec4);
+
+ float1 = sin(float1 );
+ test_vec2 = sin(test_vec2);
+ test_vec3 = sin(test_vec3);
+ test_vec4 = sin(test_vec4);
+
+ float1 = cos(float1);
+ test_vec2 = cos(test_vec2);
+ test_vec3 = cos(test_vec3);
+ test_vec4 = cos(test_vec4);
+
+ float1 = tan(float1);
+ test_vec2 = tan(test_vec2);
+ test_vec3 = tan(test_vec3);
+ test_vec4 = tan(test_vec4);
+
+ float1 = asin(float1);
+ test_vec2 = asin(test_vec2);
+ test_vec3 = asin(test_vec3);
+ test_vec4 = asin(test_vec4);
+
+ float1 = acos(float1);
+ test_vec2 = acos(test_vec2);
+ test_vec3 = acos(test_vec3);
+ test_vec4 = acos(test_vec4);
+
+ float1 = atan(float1, float1);
+ test_vec2 = atan(test_vec2, test_vec2);
+ test_vec3 = atan(test_vec3, test_vec3);
+ test_vec4 = atan(test_vec4, test_vec4);
+
+ float1 = atan(float1);
+ test_vec2 = atan(test_vec2);
+ test_vec3 = atan(test_vec3);
+ test_vec4 = atan(test_vec4);
+
+ float1 = pow(float1, float1);
+ test_vec2 = pow(test_vec2, test_vec2);
+ test_vec3 = pow(test_vec3, test_vec3);
+ test_vec4 = pow(test_vec4, test_vec4);
+
+ float1 = exp2(float1);
+ test_vec2 = exp2(test_vec2);
+ test_vec3 = exp2(test_vec3);
+ test_vec4 = exp2(test_vec4);
+
+ float1 = log2(float1);
+ test_vec2 = log2(test_vec2);
+ test_vec3 = log2(test_vec3);
+ test_vec4 = log2(test_vec4);
+
+ float1 = sqrt(float1);
+ test_vec2 = sqrt(test_vec2);
+ test_vec3 = sqrt(test_vec3);
+ test_vec4 = sqrt(test_vec4);
+
+ float1 = inversesqrt(float1);
+ test_vec2 = inversesqrt(test_vec2);
+ test_vec3 = inversesqrt(test_vec3);
+ test_vec4 = inversesqrt(test_vec4);
+
+ float1 = abs(float1);
+ test_vec2 = abs(test_vec2);
+ test_vec3 = abs(test_vec3);
+ test_vec4 = abs(test_vec4);
+
+ float1 = sign(float1);
+ test_vec2 = sign(test_vec2);
+ test_vec3 = sign(test_vec3);
+ test_vec4 = sign(test_vec4);
+
+ float1 = floor(float1);
+ test_vec2 = floor(test_vec2);
+ test_vec3 = floor(test_vec3);
+ test_vec4 = floor(test_vec4);
+
+ float1 = ceil(float1);
+ test_vec2 = ceil(test_vec2);
+ test_vec3 = ceil(test_vec3);
+ test_vec4 = ceil(test_vec4);
+
+ float1 = fract(float1);
+ test_vec2 = fract(test_vec2);
+ test_vec3 = fract(test_vec3);
+ test_vec4 = fract(test_vec4);
+
+ float1 = mod(float1, float1);
+ test_vec2 = mod(test_vec2, float1);
+ test_vec3 = mod(test_vec3, float1);
+ test_vec4 = mod(test_vec4, float1);
+ test_vec2 = mod(test_vec2, test_vec2);
+ test_vec3 = mod(test_vec3, test_vec3);
+ test_vec4 = mod(test_vec4, test_vec4);
+
+ float1 = min(float1, float1);
+ test_vec2 = min(test_vec2, float1);
+ test_vec3 = min(test_vec3, float1);
+ test_vec4 = min(test_vec4, float1);
+ test_vec2 = min(test_vec2, test_vec2);
+ test_vec3 = min(test_vec3, test_vec3);
+ test_vec4 = min(test_vec4, test_vec4);
+
+ float1 = max(float1, float1);
+ test_vec2 = max(test_vec2, float1);
+ test_vec3 = max(test_vec3, float1);
+ test_vec4 = max(test_vec4, float1);
+ test_vec2 = max(test_vec2, test_vec2);
+ test_vec3 = max(test_vec3, test_vec3);
+ test_vec4 = max(test_vec4, test_vec4);
+
+ float1 = clamp(float1, float1, float1);
+ test_vec2 = clamp(test_vec2, float1, float1);
+ test_vec3 = clamp(test_vec3, float1, float1);
+ test_vec4 = clamp(test_vec4, float1, float1);
+ test_vec2 = clamp(test_vec2, test_vec2, test_vec2);
+ test_vec3 = clamp(test_vec3, test_vec3, test_vec3);
+ test_vec4 = clamp(test_vec4, test_vec4, test_vec4);
+
+ float1 = mix(float1, float1, float1);
+ test_vec2 = mix(test_vec2, test_vec2, float1);
+ test_vec3 = mix(test_vec3, test_vec3, float1);
+ test_vec4 = mix(test_vec4, test_vec4, float1);
+ test_vec2 = mix(test_vec2, test_vec2, test_vec2);
+ test_vec3 = mix(test_vec3, test_vec3, test_vec3);
+ test_vec4 = mix(test_vec4, test_vec4, test_vec4);
+
+ float1 = step(float1, float1);
+ test_vec2 = step(test_vec2, test_vec2);
+ test_vec3 = step(test_vec3, test_vec3);
+ test_vec4 = step(test_vec4, test_vec4);
+ test_vec2 = step(float1, test_vec2);
+ test_vec3 = step(float1, test_vec3);
+ test_vec4 = step(float1, test_vec4);
+
+ float1 = smoothstep(float1, float1, float1);
+ test_vec2 = smoothstep(test_vec2, test_vec2, test_vec2);
+ test_vec3 = smoothstep(test_vec3, test_vec3, test_vec3);
+ test_vec4 = smoothstep(test_vec4, test_vec4, test_vec4);
+ test_vec2 = smoothstep(float1, float1, test_vec2);
+ test_vec3 = smoothstep(float1, float1, test_vec3);
+ test_vec4 = smoothstep(float1, float1, test_vec4);
+
+ float1 = length(float1);
+ float1 = length(test_vec2);
+ float1 = length(test_vec3);
+ float1 = length(test_vec4);
+
+ float1 = distance(float1, float1);
+ float1 = distance(test_vec2, test_vec2);
+ float1 = distance(test_vec3, test_vec3);
+ float1 = distance(test_vec4, test_vec4);
+
+ float1 = dot(float1, float1);
+ float1 = dot(test_vec2, test_vec2);
+ float1 = dot(test_vec3, test_vec3);
+ float1 = dot(test_vec4, test_vec4);
+
+ test_vec3 = cross(test_vec3, test_vec3);
+
+ float1 = normalize(float1);
+ test_vec2 = normalize(test_vec2);
+ test_vec3 = normalize(test_vec3);
+ test_vec4 = normalize(test_vec4);
+
+ float1 = faceforward(float1, float1, float1);
+ test_vec2 = faceforward(test_vec2, test_vec2, test_vec2);
+ test_vec3 = faceforward(test_vec3, test_vec3, test_vec3);
+ test_vec4 = faceforward(test_vec4, test_vec4, test_vec4);
+
+ float1 = reflect(float1, float1);
+ test_vec2 = reflect(test_vec2, test_vec2);
+ test_vec3 = reflect(test_vec3, test_vec3);
+ test_vec4 = reflect(test_vec4, test_vec4);
+
+ test_bvec2 = lessThan(test_vec2, test_vec2);
+ test_bvec3 = lessThan(test_vec3, test_vec3);
+ test_bvec4 = lessThan(test_vec4, test_vec4);
+
+ test_bvec2 = lessThan(test_ivec2, test_ivec2);
+ test_bvec3 = lessThan(test_ivec3, test_ivec3);
+ test_bvec4 = lessThan(test_ivec4, test_ivec4);
+
+ test_bvec2 = lessThanEqual(test_vec2, test_vec2);
+ test_bvec3 = lessThanEqual(test_vec3, test_vec3);
+ test_bvec4 = lessThanEqual(test_vec4, test_vec4);
+
+ test_bvec2 = lessThanEqual(test_ivec2, test_ivec2);
+ test_bvec3 = lessThanEqual(test_ivec3, test_ivec3);
+ test_bvec4 = lessThanEqual(test_ivec4, test_ivec4);
+
+ test_bvec2 = greaterThan(test_vec2, test_vec2);
+ test_bvec3 = greaterThan(test_vec3, test_vec3);
+ test_bvec4 = greaterThan(test_vec4, test_vec4);
+
+ test_bvec2 = greaterThan(test_ivec2, test_ivec2);
+ test_bvec3 = greaterThan(test_ivec3, test_ivec3);
+ test_bvec4 = greaterThan(test_ivec4, test_ivec4);
+
+ test_bvec2 = greaterThanEqual(test_vec2, test_vec2);
+ test_bvec3 = greaterThanEqual(test_vec3, test_vec3);
+ test_bvec4 = greaterThanEqual(test_vec4, test_vec4);
+
+ test_bvec2 = greaterThanEqual(test_ivec2, test_ivec2);
+ test_bvec3 = greaterThanEqual(test_ivec3, test_ivec3);
+ test_bvec4 = greaterThanEqual(test_ivec4, test_ivec4);
+
+ test_bvec2 = equal(test_vec2, test_vec2);
+ test_bvec3 = equal(test_vec3, test_vec3);
+ test_bvec4 = equal(test_vec4, test_vec4);
+
+ test_bvec2 = equal(test_ivec2, test_ivec2);
+ test_bvec3 = equal(test_ivec3, test_ivec3);
+ test_bvec4 = equal(test_ivec4, test_ivec4);
+
+ test_bvec2 = equal(test_bvec2, test_bvec2);
+ test_bvec3 = equal(test_bvec3, test_bvec3);
+ test_bvec4 = equal(test_bvec4, test_bvec4);
+
+ test_bool = any(test_bvec2);
+ test_bool = any(test_bvec3);
+ test_bool = any(test_bvec4);
+
+ test_bool = all(test_bvec2);
+ test_bool = all(test_bvec3);
+ test_bool = all(test_bvec4);
+
+ float1 = noise1(float1);
+ float1 = noise1(test_vec2);
+ float1 = noise1(test_vec3);
+ float1 = noise1(test_vec4);
+
+ test_vec2 = noise2(float1);
+ test_vec2 = noise2(test_vec2);
+ test_vec2 = noise2(test_vec3);
+ test_vec2 = noise2(test_vec4);
+
+ test_vec3 = noise3(float1);
+ test_vec3 = noise3(test_vec2);
+ test_vec3 = noise3(test_vec3);
+ test_vec3 = noise3(test_vec4);
+
+ test_vec4 = noise4(float1);
+ test_vec4 = noise4(test_vec2);
+ test_vec4 = noise4(test_vec3);
+ test_vec4 = noise4(test_vec4);
+
+ float bias, lod;
+
+ test_vec4 = texture1D(sampler, float1);
+ test_vec4 = texture1DProj(sampler, test_vec2);
+ test_vec4 = texture1DProj(sampler, test_vec4 );
+ test_vec4 = texture1DLod(sampler, float1 , lod );
+ test_vec4 = texture1DProjLod(sampler, test_vec2 , lod );
+ test_vec4 = texture1DProjLod(sampler, test_vec4 , lod );
+ test_vec4 = texture2D(sampler2, test_vec2 );
+ test_vec4 = texture2DProj(sampler2, test_vec3 );
+ test_vec4 = texture2DProj(sampler2, test_vec4 );
+ test_vec4 = texture2DLod(sampler2, test_vec2 , lod );
+ test_vec4 = texture2DProjLod(sampler2, test_vec3 , lod );
+ test_vec4 = texture2DProjLod(sampler2, test_vec4 , lod );
+ test_vec4 = texture3D(sampler3, test_vec3 );
+ test_vec4 = texture3DProj(sampler3, test_vec4 );
+ test_vec4 = texture3DLod(sampler3, test_vec3 , lod );
+ test_vec4 = texture3DProjLod(sampler3, test_vec4 , lod );
+ test_vec4 = textureCube(samplerc, test_vec3 );
+ test_vec4 = textureCubeLod(samplerc, test_vec3 , lod );
+ test_vec4 = shadow1D(sampler1dshadow, test_vec3 );
+ test_vec4 = shadow2D(sampler2dshadow, test_vec3 );
+ test_vec4 = shadow1DProj(sampler1dshadow, test_vec4 );
+ test_vec4 = shadow2DProj(sampler2dshadow, test_vec4 );
+ test_vec4 = shadow1DLod(sampler1dshadow, test_vec3 , lod );
+ test_vec4 = shadow2DLod(sampler2dshadow, test_vec3 , lod );
+ test_vec4 = shadow1DProjLod(sampler1dshadow, test_vec4, lod);
+ test_vec4 = shadow2DProjLod(sampler2dshadow, test_vec4,lod);
+
+
+
+ test_vec4 = ftransform();
+
+
+ gl_Position = gl_Vertex ;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFunction1.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFunction1.vert
new file mode 100644
index 00000000..9270850b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectFunction1.vert
@@ -0,0 +1,37 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+vec3 bar(vec3, vec3);
+
+uniform vec2 v;
+
+bool foo(out vec3);
+
+void main()
+{
+ bool b1, b2, b3, b4, b5, b6;
+
+ b1 = any(lessThan(v, v));
+
+ b2 = all(lessThanEqual(v, v));
+
+ b3 = any(not(greaterThan(v, v)));
+
+ b4 = any(greaterThanEqual(v, v));
+
+ b5 = any(notEqual(v, v));
+
+ b6 = any(equal(v, v));
+
+ vec2 u;
+ if (b1 && b2 && b3 && b4 && b5 && b6)
+ u = v;
+
+ gl_Position = vec4(u, u);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectMatComma.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectMatComma.frag
new file mode 100644
index 00000000..94c16691
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectMatComma.frag
@@ -0,0 +1,27 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const mat4 tempMat = mat4(1,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0);
+ const vec4 v1 = tempMat[true ? 0 : 1]; // 1,0,0,1
+ const vec4 v2 = tempMat[0,1]; // 1,0,1,0
+ const vec4 v3 = tempMat[int(v2.x)]; // tempMat[1]; = 1,0,1,0
+ const vec4 v4 = tempMat[1+2]; // 0,0,0,0
+ const vec4 v5 = tempMat[int(!false)]; // 1,0,1,0
+ const float f = v1[1,0]; // v[0] = 1
+ const float f2 = v1[3-2]; // v[1] = 0
+
+ vec4 v7 = tempMat[2,1]; // 1,0,1,0
+ mat4 m = mat4(1,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0);
+ vec4 v9 = m[1,2];
+
+
+ gl_FragColor = v1 + v2 + v3 + v4 + v5 + vec4(f) + vec4(f2) + v7 + v9;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectMatComma2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectMatComma2.frag
new file mode 100644
index 00000000..a537546a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectMatComma2.frag
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const mat4 tempMat = mat4(1,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0);
+
+ int i = 0;
+ int j = 1;
+
+ vec4 v6 = tempMat[i,j];
+ vec4 v8 = tempMat[j,2];
+ mat4 m = mat4(1,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0);
+ vec4 v10 = m[j]; // 1,0,0,1
+ vec4 v11 = m[j,2];
+ vec4 v12 = m[2,j];
+
+
+ gl_FragColor = v6 + v8 + v10 + v11 + v12;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectModule.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectModule.frag
new file mode 100644
index 00000000..a19af869
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectModule.frag
@@ -0,0 +1,62 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+vec4 test_function4(float);
+vec4 test_function1(float);
+vec4 test_function2(float);
+vec4 test_function3(float);
+float f = 2.6;
+
+
+vec4 test_function1(float ff)
+{
+ vec4 func_vec4 = vec4(ff+f);
+ return func_vec4;
+}
+
+float f1 = 1.5;
+
+vec4 test_function4(float ff)
+{
+ vec4 func_vec4 = vec4(f1);
+ return func_vec4;
+}
+
+float f2 = 3.5;
+
+void main()
+{
+ vec4 v1 = test_function4(f2);
+ vec4 v2 = test_function1(f2);
+ vec4 v3 = test_function2(f2);
+ vec4 v4 = test_function3(f2);
+
+ if (f1 > f2) {
+ gl_FragColor = v1 + v2 + v3 + v4;
+ } else
+ gl_FragColor = v1 + v2 + v3 + v4;
+}
+
+float f4 = 5.5;
+vec4 test_function3(float ff)
+{
+ if (ff > f4)
+ return vec4(ff);
+ else
+ return vec4(f4);
+}
+
+float f3 = 4.5;
+vec4 test_function2(float ff)
+{
+ vec4 func_vec4 = vec4(ff+f3);
+ return func_vec4;
+}
+
+float f5 = 6.5;
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse1.frag
new file mode 100644
index 00000000..ef6ca2c3
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse1.frag
@@ -0,0 +1,50 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform vec3 a[8];
+
+uniform bool ub;
+varying mat4 vm;
+
+int foo(float);
+
+float bar(int i)
+{
+ return float(i);
+}
+
+void main (void)
+{
+ const int x = 3;
+ mat4 a[4];
+ vec4 v;
+ float f;
+
+ for (f = 0.0; f != 3.3; ++f)
+ {
+ }
+
+ vec3 v3[x + x];
+
+ int vi = foo(2.3);
+
+ vec3 v3_1 = v3[x];
+
+ float f1 = a[x][2].z * float(x);
+ f1 = a[x][2][2] * float(x);
+ f1 = v[2] * v[1];
+
+ const int ci = 2;
+
+}
+
+int foo(float f)
+{
+ return 2;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse2.frag
new file mode 100644
index 00000000..092ae3a8
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse2.frag
@@ -0,0 +1,134 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
+const bool BoolConst1 = true && true || false;
+const bool BoolConst2 = false || !false && false;
+
+void main (void)
+{
+ float float1 = 4.0, float2 = floatConst2;
+ int int_1 = int(FloatConst1);
+ vec4 vec4_1;
+ vec3 vec3_1;
+// unsigned int unsigned_int_1;
+ bool bool4, bool5;
+
+ bool4 = bool5;
+ //float1 = bool5;
+ //bool5 = float1;
+
+ bool4 = 4.0 > 5.0;
+ bool4 = !(3.2 != 0.0);
+ bool4 = bool(float1);
+ bool4 = bool(int_1);
+ float1 = float(bool4);
+ float1 = float(int_1);
+ int_1 = int(float1);
+ int_1 = int(bool4);
+
+ {
+ int a, b, c;
+
+ a = b;
+ b = c;
+ {
+ int b, c, d;
+
+ b = c;
+ c = d;
+ {
+ int a, d, e;
+
+ a = d;
+ d = e;
+ }
+ {
+ int a, b, c;
+ a = b;
+ b = c;
+ }
+ }
+ a = b;
+ b = c;
+ }
+
+ {
+ float f1, f2;
+ vec3 v31, v32;
+
+ max(f1, f2);
+ max(v31, v32);
+
+ vec4 v4 = vec4(3.0);
+ vec3 v3 = -vec3(2.0, 1.0, 3.0);
+ mat2 m2 = mat2(3.0, 4.0, 6.0, 3.0);
+ //mat4 m4 = mat4(1.0, m2, v3, v4, m2);
+ }
+
+ if (BoolConst1)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst2)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst1 || BoolConst2)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst2 && BoolConst1)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (FloatConst1 != 0.0)
+ --int_1;
+ else
+ ++int_1;
+
+ if (0 != 0)
+ ++int_1;
+ else
+ --int_1;
+
+ bool4 = BoolConst1 && ! (int_1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0.0) && (FloatConst1 != 0.0) && (float1 != 0.0);
+
+ float1 = 5 != 0 ? float1 : float(int_1);
+ float1 = 0 != 0 ? float1 : float(int_1);
+
+ if (float1 != float1)
+ ++int_1;
+ else
+ --int_1;
+
+ float1 = float1 != float1 ? float1 : float(int_1);
+
+ --int_1;
+ ++float1;
+ (vec4_1.x)--;
+ vec3_1++;
+
+ if (int_1 != 4)
+ discard;
+
+ float1 = 4.0 + 6.0;
+ int ii,jj,kk;
+ float ff;
+ ii = jj, kk, ff;
+
+ vec4_1 = vec4_1 + 2.0;
+ ivec4 iv;
+ iv = iv + 2;
+ gl_FragColor = vec4(float1+float1, float1, float1, float(int_1));
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse2.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse2.vert
new file mode 100644
index 00000000..ffcaf523
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParse2.vert
@@ -0,0 +1,149 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
+const bool BoolConst1 = true && true || false;
+const bool BoolConst2 = false || !false && false;
+
+void main (void)
+{
+ float float1 = 4.0, float2 = floatConst2;
+ int int_1 = int(FloatConst1);
+ vec4 vec4_1;
+ vec3 vec3_1, vec3_2;
+// unsigned int unsigned_int_1;
+ bool bool4, bool5;
+
+ bool4 = bool5;
+ //float1 = bool5;
+ //bool5 = float1;
+
+ bool4 = 4 > 5;
+ bool4 = !(3.2 != 0.0);
+ bool4 = bool(float1);
+ bool4 = bool(int_1);
+ float1 = float(bool4);
+ float1 = float(int_1);
+ int_1 = int(float1);
+ int_1 = int(bool4);
+
+ {
+ int a, b, c;
+
+ a = b;
+ b = c;
+ {
+ int b, c, d;
+
+ b = c;
+ c = d;
+ {
+ int a, d, e;
+
+ a = d;
+ d = e;
+ }
+ {
+ int a, b, c;
+ a = b;
+ b = c;
+ }
+ }
+ a = b;
+ b = c;
+ }
+
+ {
+ float f1, f2;
+ vec3 v31, v32;
+
+ max(f1, f2);
+ max(v31, v32);
+
+ vec4 v4 = vec4(3.0);
+ vec3 v3 = -vec3(2.0, 1.0, 3.0);
+ mat2 m2 = mat2(3.0, 4.0, 6.0, 3.0);
+ //mat4 m4 = mat4(1.0, m2, v3, v4, m2);
+ }
+
+ if (BoolConst1)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst2)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst1 || BoolConst2)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst2 && BoolConst1)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (FloatConst1 != 0.0)
+ --int_1;
+ else
+ ++int_1;
+
+ if (0 != 0)
+ ++int_1;
+ else
+ --int_1;
+
+ bool4 = BoolConst1 && ! (int_1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0.0) && (FloatConst1 != 0.0) && (float1 != 0.0);
+
+ float1 = 5 != 0 ? float1 : float(int_1);
+ float1 = BoolConst1 ? float1 : float(int_1);
+
+ if (float1 != float1)
+ ++int_1;
+ else
+ --int_1;
+
+ float1 = float1 != float1 ? float1 : float(int_1);
+
+ --int_1;
+ ++float1;
+ (vec4_1.x)--;
+ vec3_1++;
+
+ if (vec3_1.x > vec3_2.x)
+ float1 = 4.0 + 6.0;
+
+ if (bool4 ^^ bool5)
+ float1 *= 2.4;
+
+ if (false ^^ false)
+ float1 *= 2.5;
+
+ if (true ^^ false)
+ float1 *= 2.6;
+
+ {
+ int i;
+ }
+
+ if (bool4) {
+ int i;
+ } else {
+ int i;
+ i = 5;
+ }
+
+ mat4 m1;
+ m1[2][1] = 4.0;
+
+ gl_Position = vec4(float1+float1, float1, float1, float(int_1));
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParseTest.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParseTest.frag
new file mode 100644
index 00000000..d0c86b34
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParseTest.frag
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s{
+ float f;
+ vec3 v;
+} s1 ;
+void main()
+{
+ vec4 v = vec4(float(vec2(1,2)), 5,6,7); // 1, 5, 6, 7
+ vec4 v1 = vec4(3, vec2(ivec2(1,2)), 4); // 3, 1, 2, 4
+ vec4 v2 = vec4(8, 9, vec4(ivec4(1,2,3,4))); // 8,9, 1,2
+ vec2 v3 = vec2(v2); // 8,9
+ vec4 v4 = vec4(v3, v2.z, v2.w); // 8,9,1,2
+
+ const vec4 v5 = vec4(2.0, s(2.0, vec3(3,4,5)).v); // 2,3,4,5
+ gl_FragColor = v5 + v + v1 + v4 ; // 14, 18, 13, 18
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParseTest1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParseTest1.frag
new file mode 100644
index 00000000..87afb892
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectParseTest1.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ vec4 v;
+} s2;
+
+void main()
+{
+ s s1 = s(vec4(ivec4(4.0, vec2(5,6), 7.0)));
+ vec4 v = vec4(2,ivec2(3.0, 4.0), 5.0);
+ vec4 v4 = vec4(ivec4(8.0));
+
+ gl_FragColor = v4 + v + s1.v;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess11.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess11.frag
new file mode 100644
index 00000000..86eb1c5b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess11.frag
@@ -0,0 +1,68 @@
+#if 0
+
+#define f 1.2
+
+#elif 1
+
+#define f 1.4
+
+#endif
+
+
+
+#if 2
+
+#define q 8.9
+
+#endif
+
+
+
+
+#if 0
+these tokens will be ignored
+
+#else tokens to be ignored
+#define f 4.5
+
+#endif
+
+
+
+#if 1
+
+#else
+
+#endif
+
+
+
+#define pine
+
+
+#ifdef pine please raise a warning
+
+#else
+
+#endif
+
+
+
+#ifndef pine
+
+ignore these tokens too
+
+#elif 1
+#define f 3.4
+
+#endif
+
+
+
+void main()
+
+{
+
+ gl_FragColor = vec4(f);
+
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess5.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess5.frag
new file mode 100644
index 00000000..5b8fe0c6
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess5.frag
@@ -0,0 +1,35 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+//mutiple line macros - test case.
+
+#define test 5
+#define t1 1
+#define t2 2
+#define token (t1+t2)
+#define test1 int sum =1;\
+ sum = test;\
+ sum = test+test;
+
+#define test2 do{\
+ test1\
+ sum = sum +token;\
+ sum = t2*t1;\
+ }while(sum>0)
+
+void main(void)
+{
+ int test3=1;
+ test1
+ test2;
+ test3 = test;
+ sum = test3;
+}
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess8.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess8.frag
new file mode 100644
index 00000000..455ec2f8
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess8.frag
@@ -0,0 +1,113 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+// Extensive testing on #if #else #elif #ifdef, #ifndef and #endif.
+
+
+#define t1 1
+
+#if(t1==1)
+ #define t2 2
+#endif
+
+#if (t2!=2)
+ #define t3 33
+#else
+ #define t3 3
+#endif
+
+#if (t3!=3)
+ #define t4 4
+#elif (t3==3)
+ #define t4 44
+#else
+ #define t4 0
+#endif
+
+#if defined(t5)
+ #define t6 6
+#elif (t3!=3)
+ #define t5 5
+#elif (t3==3)
+ #define t5 5
+#endif
+
+#ifdef t5
+ #define t6 6
+#else
+ #define t7 7
+#endif
+
+#ifndef t8
+ #define t8 8
+#endif
+
+#if defined t8
+ #define t9
+ #ifdef t9
+ #define t10 10
+ #endif
+#elif
+ #define t11 11
+#endif
+
+#ifndef t8
+ #define t12 12
+#else
+ #define t12 12
+ #ifndef t13
+ #define t13 13
+ #endif
+ #ifdef t14
+ #define t15 15
+ #else
+ #if defined t8
+ #define t16 16
+ #endif
+ #endif
+#endif
+
+#ifdef t1
+ #ifdef t10
+ #if defined t8
+ #if defined(t3)
+ #ifndef t20
+ #define t25 25
+ #endif
+ #else
+ #define t15 15
+ #define t24 24
+ #endif
+ #endif
+ #endif
+#else
+ #ifdef t21
+ #define t22 22
+ #else
+ #define t23 23
+ #endif
+#endif
+#define t7 7
+#define t11 11
+#define t14 14
+#define t15 15
+#define t20 20
+#define t22 22
+#define t23 23
+#define t24 42
+
+void main(void)
+{
+ int sum =0;
+ sum = t1+t2+t3+t4+t5;
+ sum = t6+t7+t8+t9+t10;
+ sum = t11+t12+t13+t14+t15;
+ sum = t16+t20+t22+t23+t25+t24;
+}
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess9.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess9.frag
new file mode 100644
index 00000000..2ea53d1e
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectPreprocess9.frag
@@ -0,0 +1,30 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#define t1 2.3333333333333333
+#define t2 (0.978293600-1.0)
+#define t3 .9090909090
+#define t4 26578235.000000083487
+#define t5 78e-03
+#define t6 78.100005E+05
+#define t7 6278.78e-5
+
+void main(void){
+ float tes=2e-3;
+ float test=3.2e-5;
+ float test1=0.99995500;
+ float test2=6789.983;
+
+ test = t1+t2;
+ test = t3-t4;
+ tes = t5 * t6;
+ test2 = t7;
+
+ gl_FragColor = vec4(test, tes, test1, test2);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectReservedWords.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectReservedWords.frag
new file mode 100644
index 00000000..a85a9ffd
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectReservedWords.frag
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform float MIN;
+uniform float R0;
+uniform float FOGC;
+uniform float CUBE;
+uniform float f;
+uniform float o;
+uniform float p;
+uniform float w;
+uniform float x;
+uniform float y;
+uniform float z;
+
+void main()
+{
+ gl_FragColor = vec4(f, o, p, w);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectScalarVectorExpressions.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectScalarVectorExpressions.frag
new file mode 100644
index 00000000..18f76d37
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectScalarVectorExpressions.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec2 v = vec2(1.0, 2.0);
+ v *= 2.0; // Legal in GLSL.
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle1.frag
new file mode 100644
index 00000000..36fa9e99
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle1.frag
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec2 v = vec2(1,5);
+ // at the end of next statement, values in
+ // v.x = 12, v.y = 12
+ v.xy += v.yx += v.xy;
+ // v1 and v2, both are initialized with 12
+ vec2 v1 = v, v2 = v;
+
+ v1.xy += v2.yx += ++(v.xy); // v1 = 37, v2 = 25 each
+ v1.xy += v2.yx += (v.xy)++; // v1 = 75, v2 = 38 each
+ gl_FragColor = vec4(v1,v2); // 75, 75, 38, 38
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle1.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle1.vert
new file mode 100644
index 00000000..d958b987
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle1.vert
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main(void)
+{
+ vec4 v = vec4(1,2,3,4);
+ vec3 v3 = vec3(5,6,7);
+ vec4 v4 = vec4(normalize(v3.yzy).xyz.zyx, 1.0);
+ gl_Position = v4 + vec4(normalize(gl_NormalMatrix * gl_Normal).xyz.zyx, v4.y);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle2.frag
new file mode 100644
index 00000000..87398e73
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle2.frag
@@ -0,0 +1,37 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f, f1, f2;
+ f = f1 = f2;
+ f += f1 += f2;
+
+ vec4 v, v1, v2;
+ v = v1 = v2;
+ v += v1 += v2;
+ v.wx = v1.zx = v2.yx;
+ v.wx += v1.zx += v2.yx;
+
+ mat4 m, m1, m2;
+ m = m1 = m2;
+ m += m1 += m2;
+ m[3].wx = m1[2].zx = m2[1].yx;
+ m[3].wx += m1[2].zx += m2[1].yx;
+
+ mat4 am[4], am1[4], am2[4];
+ am[3] = am1[2] = am2[1];
+ am[3] += am1[2] += am2[1];
+ am[3][3].wx = am1[2][2].zx = am2[1][1].yx;
+ am[3][3].wx += am1[2][2].zx += am2[1][1].yx;
+ am[3][3].wx += am1[2][2].zx += ++(am2[1][1].yx);
+ am[3][3].wx += am1[2][2].zx += (am2[1][1].yx)++;
+
+ gl_FragColor = vec4(am[3][3].z, m[3].w, v.w, f);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle2.vert b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle2.vert
new file mode 100644
index 00000000..cdd6e977
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle2.vert
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec4 v1 = vec4(5,6,7,8);
+ vec4 v2 = vec4(9,10, 11, 12);
+ vec3 v3 = (v1 * v2).ywx;
+ float f = (v2 * v1).z;
+ vec3 v4 = normalize((v1.ywx * v3).xyz).xyz;
+ gl_Position = vec4(v4, f);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle3.frag
new file mode 100644
index 00000000..c317a656
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectSwizzle3.frag
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec4 v = vec4(5,6,7,8);
+ // value changes for lhs
+ // 8765, 6758, 857, 75 i.e. replace v.zx
+ // value changes for rhs
+ // 8765, 6758, 86 i.e replace with v.wy
+ // replace v.z with v.w
+ // replace v.x with v.y
+ // add 1.000000 to v.w and v.y
+ v.wzyx.zywx.wzy.zy = (v.wzyx.zywx.wx)++;
+ gl_FragColor = vec4(v); // 6,7,8,9
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectUnsizedArray.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectUnsizedArray.frag
new file mode 100644
index 00000000..6add2874
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectUnsizedArray.frag
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+int array[2];
+varying vec4 gl_TexCoord[];
+varying vec4 gl_TexCoord[2];
+
+void main()
+{
+ {
+ float array[];
+ float array[2];
+ }
+ {
+ vec2 array[];
+ vec2 v = array[1];
+ vec2 array[2];
+ }
+ int i = array[1];
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectVersion.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectVersion.V110.frag
new file mode 100644
index 00000000..83c758b2
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectVersion.V110.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+/* #version can only be followed by number 110. The only statements before
+ #version can be comment or white spaces */
+
+
+
+#version 110
+
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/CorrectVersion1.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectVersion1.V110.frag
new file mode 100644
index 00000000..c49078d1
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/CorrectVersion1.V110.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+/* Only one version statement is allowed; two should raise an error. */
+#version 110
+#version 110
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/FunctionParam.vert b/tests/spec/glsl-es-1.00/compiler/shaders/FunctionParam.vert
new file mode 100644
index 00000000..9bd192b0
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/FunctionParam.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+int y = 1;
+
+int foo(int, int b[y]) // array size should be constant
+{
+ return 1;
+}
+
+void main()
+{
+ int a[1];
+
+ gl_Position = vec4(1.0);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/IncludeDirective.frag b/tests/spec/glsl-es-1.00/compiler/shaders/IncludeDirective.frag
new file mode 100644
index 00000000..3c387305
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/IncludeDirective.frag
@@ -0,0 +1,10 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#include "../shaders/IncludeDirective.frag"
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/MainParameters.vert b/tests/spec/glsl-es-1.00/compiler/shaders/MainParameters.vert
new file mode 100644
index 00000000..ecc4ae44
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/MainParameters.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main(vec4 position : POSITION)
+{
+ gl_Position = position;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/ParseTest3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/ParseTest3.frag
new file mode 100644
index 00000000..28c236c7
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/ParseTest3.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const vec4 v = vec4(normalize(vec4(1))); // builtIn functions do not return const
+ const vec4 v1 = vec4(clamp(1.0, .20, 3.0)); // builtIn functions do not return const
+ float f = 1.0;
+ const vec4 v2 = vec4(float(vec4(1,2,3,f))); // f is not constant
+
+ gl_FragColor = v + v1 + v2;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/ParseTest4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/ParseTest4.frag
new file mode 100644
index 00000000..6391baf7
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/ParseTest4.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const vec4 v = vec2(2.0, 3.0);
+ gl_FragColor = v;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/TernaryOp.frag b/tests/spec/glsl-es-1.00/compiler/shaders/TernaryOp.frag
new file mode 100644
index 00000000..3386f1d1
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/TernaryOp.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ mat4 m;
+ vec4 v;
+ bool b;
+ gl_FragColor = b ? v : m;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/TextureRectangleSamplers.frag b/tests/spec/glsl-es-1.00/compiler/shaders/TextureRectangleSamplers.frag
new file mode 100644
index 00000000..38973cc4
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/TextureRectangleSamplers.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform sampler2DRect samp;
+
+void main()
+{
+ gl_FragColor = texture2DRect(samp, vec2(0.0, 0.0));
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array1.frag
new file mode 100644
index 00000000..4d560e95
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array1.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int array[2][2]; // two dimentional arrays are not allowed
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array10.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array10.frag
new file mode 100644
index 00000000..5ad3e67b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array10.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+
+void main()
+{
+ float f[];
+ float flt = f[5];
+ float f[3]; // higher array index has already been used
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array11.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array11.frag
new file mode 100644
index 00000000..d87fa1e7
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array11.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f[];
+ int f[4]; // array redeclared with a different type
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array2.frag
new file mode 100644
index 00000000..17979402
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array2.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const int array[2]; // cannot declare const arrays
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array3.frag
new file mode 100644
index 00000000..5e70a27c
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array3.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int array1[2], array2[2];
+ bool b = array1 == array2; // equality operator does not work on arrays but works on array elements
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array4.frag
new file mode 100644
index 00000000..fa9140a9
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array4.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f[-2]; // cannot declare arrays with negative size
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array5.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array5.frag
new file mode 100644
index 00000000..51f798de
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array5.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i = 3;
+ float f[i]; // arrays should be declared with a constant size
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array6.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array6.frag
new file mode 100644
index 00000000..48c8ac79
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array6.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const float index = 3.0;
+ float f[index]; // arrays should be declared with an integer expression not float
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array7.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array7.frag
new file mode 100644
index 00000000..ccc5408d
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array7.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f[5];
+ f[]; // array used without a size
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array8.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array8.frag
new file mode 100644
index 00000000..75888fa1
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array8.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f[5];
+ float f[]; // redeclaration of array already declared with a size
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/array9.frag b/tests/spec/glsl-es-1.00/compiler/shaders/array9.frag
new file mode 100644
index 00000000..34ef1ab1
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/array9.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec2 array[2];
+ array.xy; // arrays cannot directly be swizzled, however, an element of array can be swizzled
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/attribute.frag b/tests/spec/glsl-es-1.00/compiler/shaders/attribute.frag
new file mode 100644
index 00000000..6524e2d9
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/attribute.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ attribute float foo; // attributes can be declared at global scope in vertex shader only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/attribute.vert b/tests/spec/glsl-es-1.00/compiler/shaders/attribute.vert
new file mode 100644
index 00000000..ebe97eb2
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/attribute.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ attribute float foo; // attributes can be declared at a global scope only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/attribute1.vert b/tests/spec/glsl-es-1.00/compiler/shaders/attribute1.vert
new file mode 100644
index 00000000..b8694590
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/attribute1.vert
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+attribute int i; // attributes cannot be int or bool
+
+void main()
+{
+ gl_Position = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/attribute2.vert b/tests/spec/glsl-es-1.00/compiler/shaders/attribute2.vert
new file mode 100644
index 00000000..4aa45cf9
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/attribute2.vert
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+attribute float f[2]; // attributes cannot be arrays
+
+void main()
+{
+ gl_Position = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/break.frag b/tests/spec/glsl-es-1.00/compiler/shaders/break.frag
new file mode 100644
index 00000000..261a96ee
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/break.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ break; // break keyword allowed only inside the loops
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/comma1.vert b/tests/spec/glsl-es-1.00/compiler/shaders/comma1.vert
new file mode 100644
index 00000000..11a7661b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/comma1.vert
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i, j, k;
+ float f;
+ i = j, k, f;
+ i = (j, k, f); // float cannot be assigned to int
+ gl_Position = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/comma2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/comma2.frag
new file mode 100644
index 00000000..ecb94cce
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/comma2.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const vec4 v = (vec4(1,2,3,4), vec4(5,6,7,8), 1.2); // right most value of comma operator shoul be a vec4
+ const vec4 v1 = (vec3(0.2, 2.0), vec4(1,2,3,4), vec4(5,6,7,8));
+ const vec4 v2 = (vec4(1,2,3,4), vec2(2.1, 2), vec4(5,6,7,8));
+ gl_FragColor = v + v1 + v2;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/comma2.vert b/tests/spec/glsl-es-1.00/compiler/shaders/comma2.vert
new file mode 100644
index 00000000..554570ef
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/comma2.vert
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i, j, k;
+ float f;
+ i = j, k, f;
+ i = (j = k, f = 1.0); // float cannot be assigned to int
+ gl_Position = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/comma3.vert b/tests/spec/glsl-es-1.00/compiler/shaders/comma3.vert
new file mode 100644
index 00000000..41d161c0
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/comma3.vert
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i, j, k;
+ float f;
+ i = j, k, f;
+ i = j = k, f = 1.0;
+ i = j, k = (3, f); // float cannot be assigned to int
+ gl_Position = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/comment.frag b/tests/spec/glsl-es-1.00/compiler/shaders/comment.frag
new file mode 100644
index 00000000..a5d254a5
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/comment.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ /****** // comment not closed
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/conditional1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/conditional1.frag
new file mode 100644
index 00000000..f0359923
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/conditional1.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f1,f2;
+ int i;
+ float f3 = i ? f1 : f2; // expression must be boolean and not int
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/conditional2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/conditional2.frag
new file mode 100644
index 00000000..f20cbc6b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/conditional2.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f1,f2;
+ int i;
+ bool b;
+ float f3 = b ? i : f2; // second and third expression should of the type float
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/conditional3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/conditional3.frag
new file mode 100644
index 00000000..2f39ec5d
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/conditional3.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f1,f2;
+ bool b;
+ int i = b ? f1 : f2; // second and third expression type does not match the lvalue type
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/constFunc.frag b/tests/spec/glsl-es-1.00/compiler/shaders/constFunc.frag
new file mode 100644
index 00000000..1a71ec79
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/constFunc.frag
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+vec2 func()
+{
+ vec2 v;
+ return v;
+}
+
+void main()
+{
+ const vec3 v = vec3(1.0, func()); // user defined functions do not return const value
+ gl_FragColor = vec4(v, v);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/constructor1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/constructor1.frag
new file mode 100644
index 00000000..54ea9b08
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/constructor1.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec4 v = vec4(1,2,3); // insufficient data provided for constructor, 4 values are required
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/constructor2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/constructor2.frag
new file mode 100644
index 00000000..667b660b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/constructor2.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec3 v;
+ vec4 v1 = vec4(v); // insufficient data specified for construction
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/constructor3.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/constructor3.V110.frag
new file mode 100644
index 00000000..460ae172
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/constructor3.V110.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec3 v;
+ vec4 v1 = vec4(v,v,v); // too many arguments in the constructor
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/continue.frag b/tests/spec/glsl-es-1.00/compiler/shaders/continue.frag
new file mode 100644
index 00000000..7b3befaa
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/continue.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ continue; // continue keyword allowed only inside the loops
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType1.frag
new file mode 100644
index 00000000..bbb94955
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType1.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ void v; // variable cannot be declared of the type void
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType10.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType10.frag
new file mode 100644
index 00000000..09c0676a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType10.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f;
+ float f; // redeclaration of a variable
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType11.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType11.frag
new file mode 100644
index 00000000..2c983474
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType11.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i = 08; // invalid octal number
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType12.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType12.frag
new file mode 100644
index 00000000..585274ce
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType12.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i = 0xa8g; // invalid hexadecimal number
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType13.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType13.frag
new file mode 100644
index 00000000..72a60249
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType13.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i = 1;
+ float f = 1.2;
+ float result = f * i; // auto promotion now allowed
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType19.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType19.frag
new file mode 100644
index 00000000..0adbd33c
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType19.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform sampler1D s;
+void main()
+{
+ int i = int(s); // conversion not allowed
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType2.frag
new file mode 100644
index 00000000..c0e184fb
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType2.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform sampler1D samp1;
+uniform sampler1D samp2 = samp1; // uniforms are read only
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType3.frag
new file mode 100644
index 00000000..66926871
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType3.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#version 110
+
+/*
+ * In GLSL 1.10 uniform initializers are illegal
+ * In GLSL 1.20 or later, uniform initializers are allowed
+ */
+
+uniform int i = 1; // uniforms are read only in GLSL 1.10
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType4.frag
new file mode 100644
index 00000000..f1125879
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType4.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i = 1.0; // automatic type conversion does not take place, float cannot be converted to int
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType5.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType5.frag
new file mode 100644
index 00000000..da535adc
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType5.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f = 1; // int cannot be converted to float, use constructor to do the conversion explicitly
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType6.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType6.frag
new file mode 100644
index 00000000..47c56495
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType6.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const float f; // constants must be initialized
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType7.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType7.frag
new file mode 100644
index 00000000..5a652a9b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType7.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform float f;
+void main()
+{
+ f = 1.0; // uniforms are read only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType8.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType8.frag
new file mode 100644
index 00000000..7b2d07bc
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType8.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+varying float f;
+void main()
+{
+ f = 1.0; // varyings cannot be written to in a fragment shader, they can be written to in a vertex shader
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dataType9.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dataType9.frag
new file mode 100644
index 00000000..24fc1ff3
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dataType9.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+varying float f;
+void main()
+{
+ float flt = 1.0;
+ flt++;
+ f++; // varyings in a fragment shader are read only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dowhile.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dowhile.frag
new file mode 100644
index 00000000..3a145503
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dowhile.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f;
+ do {
+ } while(f); // condition should be boolean
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dvec2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dvec2.frag
new file mode 100644
index 00000000..948788a6
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dvec2.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ dvec2 d; // dvec2 is not a valid datatype, reserved for future use
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dvec3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dvec3.frag
new file mode 100644
index 00000000..535a57b6
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dvec3.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ dvec3 d; // dvec3 is not a valid datatype, reserved for future use
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/dvec4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/dvec4.frag
new file mode 100644
index 00000000..1dd90f9d
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/dvec4.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ dvec4 d; // dvec4 is not a valid datatype, reserved for future use
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/extension2.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/extension2.V110.frag
new file mode 100644
index 00000000..78856030
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/extension2.V110.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#extension all : require // cannot use require or enable with all
+#extension all : enable // cannot use require or enable with all
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/extension3.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/extension3.V110.frag
new file mode 100644
index 00000000..c5337deb
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/extension3.V110.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#extension foo : require // error extension not supported
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/extension5.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/extension5.V110.frag
new file mode 100644
index 00000000..fb0dbea3
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/extension5.V110.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#extension all : ddisablee // error, behavior is not supported
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/extension6.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/extension6.V110.frag
new file mode 100644
index 00000000..0b319f2c
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/extension6.V110.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#extension // error name and behavior not specified
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/extension7.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/extension7.V110.frag
new file mode 100644
index 00000000..f0b8baa0
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/extension7.V110.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#extension foo // ":" missing after extension name
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/extension8.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/extension8.V110.frag
new file mode 100644
index 00000000..17c5226a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/extension8.V110.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#extension foo : // behavior not specified
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/extension9.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/extension9.V110.frag
new file mode 100644
index 00000000..4db7442e
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/extension9.V110.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#extension foo behavior // ":" missing after extension name
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/float2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/float2.frag
new file mode 100644
index 00000000..4d7a22ad
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/float2.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float2 f; // float2 is not a valid datatype
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/float3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/float3.frag
new file mode 100644
index 00000000..899ed824
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/float3.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float3 f; // float3 is not a valid datatype
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/float4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/float4.frag
new file mode 100644
index 00000000..81b8d2e6
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/float4.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float4 f; // float4 is not a valid datatype
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly.vert b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly.vert
new file mode 100644
index 00000000..6776090c
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_FragDepth = 1.0; // can be used in fragment shader only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly1.vert b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly1.vert
new file mode 100644
index 00000000..0bb2801b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly1.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_FrontFacing = true; // can be used in fragment shader only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly2.vert b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly2.vert
new file mode 100644
index 00000000..ecd8aaa0
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly2.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_FragCoord = vec4(1.0); // can be used in fragment shader only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly3.vert b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly3.vert
new file mode 100644
index 00000000..1798b50f
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly3.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_FragColor = vec4(1.0); // can be used in fragment shader only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly4.vert b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly4.vert
new file mode 100644
index 00000000..bcf3a113
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/fragmentOnly4.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ discard; // can be used in fragment shader only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function1.frag
new file mode 100644
index 00000000..0dd997a6
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function1.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void function(int i)
+{
+ return i; // void function cannot return a value
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function10.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function10.frag
new file mode 100644
index 00000000..c10d9097
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function10.frag
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void function(in int i);
+
+void main()
+{
+ float f;
+ // overloaded function not present
+ function(f);
+}
+
+void function(in int i)
+{
+ i = 3;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function2.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function2.V110.frag
new file mode 100644
index 00000000..46c5e3aa
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function2.V110.frag
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void function(int i[]) // size of array must be specified
+{
+}
+
+void main()
+{
+ int i[2];
+ function(i);
+}
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function3.frag
new file mode 100644
index 00000000..4b0714e4
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function3.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void function(const int i)
+{
+ i = 3; // const value cant be modified
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function4.frag
new file mode 100644
index 00000000..03a1d793
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function4.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform int uniformInt;
+
+void function(out int i)
+{
+ i = 1;
+}
+
+void main()
+{
+ function(uniformInt); // out and inout parameters cannot be uniform since uniforms cannot be modified
+}
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function5.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function5.frag
new file mode 100644
index 00000000..188023df
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function5.frag
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+int function(out int i)
+{ // function should return a value
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function6.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function6.frag
new file mode 100644
index 00000000..1798472b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function6.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void function(const out int i)
+{ // out parameters cannot be const
+ i = 3;
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function7.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function7.frag
new file mode 100644
index 00000000..80b168e3
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function7.frag
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void function(uniform int i)
+{ // uniform qualifier cannot be used with function parameters
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function8.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function8.frag
new file mode 100644
index 00000000..df483599
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function8.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void function(const inout int i)
+{ // inout parameters cannot be const
+ i = 3;
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/function9.frag b/tests/spec/glsl-es-1.00/compiler/shaders/function9.frag
new file mode 100644
index 00000000..c186f4fd
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/function9.frag
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void function(const in int i);
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+// function definition has different parameter qualifiers than function declaration
+void function(in int i)
+{
+ i = 3;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/hvec2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/hvec2.frag
new file mode 100644
index 00000000..a9a05f1b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/hvec2.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ hvec2 f; // hvec2 is not a valid datatype, reserved for future use
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/hvec3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/hvec3.frag
new file mode 100644
index 00000000..5356cf72
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/hvec3.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ hvec3 f; // hvec3 is not a valid datatype, reserved for future use
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/hvec4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/hvec4.frag
new file mode 100644
index 00000000..82173b4a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/hvec4.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ hvec4 f; // hvec4 is not a valid datatype, reserved for future use
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/identifier1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/identifier1.frag
new file mode 100644
index 00000000..73303b3f
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/identifier1.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int 1i; // incorrect identifier name
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/identifier2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/identifier2.frag
new file mode 100644
index 00000000..f61db027
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/identifier2.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int gl_int; // identifier name cannot begin with "gl_"
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/identifier3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/identifier3.frag
new file mode 100644
index 00000000..b39fa5f8
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/identifier3.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i;
+ x; // identifier x used without being declared
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/if1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/if1.frag
new file mode 100644
index 00000000..a275338b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/if1.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i;
+ if (i) // condition of if statement must be a boolean
+ i++;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/if2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/if2.frag
new file mode 100644
index 00000000..e5ec473b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/if2.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec2 v;
+ int i;
+ if (v) // vectors cannot be used as conditional expression for if statement
+ i++;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/increment1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/increment1.frag
new file mode 100644
index 00000000..97161a1d
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/increment1.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ int i;
+} s1;
+
+void main()
+{
+ s1.i++;
+ s1++; // structure cannot be incremented
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/increment2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/increment2.frag
new file mode 100644
index 00000000..c09f11c9
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/increment2.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i;
+ (i+i)++; // i+i is not an l-value
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/increment3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/increment3.frag
new file mode 100644
index 00000000..6134335a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/increment3.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform sampler1D sampler1d;
+
+void main()
+{
+ sampler1d++; // uniforms cannot be modified
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/increment4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/increment4.frag
new file mode 100644
index 00000000..089ea7e3
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/increment4.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i;
+ i++ = 5; // i++ is not an l-value
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/increment6.frag b/tests/spec/glsl-es-1.00/compiler/shaders/increment6.frag
new file mode 100644
index 00000000..01d1653d
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/increment6.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i;
+ ++i++; // ++i is not an l-value
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/main1.vert b/tests/spec/glsl-es-1.00/compiler/shaders/main1.vert
new file mode 100644
index 00000000..34e16210
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/main1.vert
@@ -0,0 +1,12 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+main() // return type of main should be void
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/main2.vert b/tests/spec/glsl-es-1.00/compiler/shaders/main2.vert
new file mode 100644
index 00000000..cfccb656
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/main2.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main(int i) // main function cannot take any parameters
+{
+ gl_Position = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/main3.vert b/tests/spec/glsl-es-1.00/compiler/shaders/main3.vert
new file mode 100644
index 00000000..deb4fa97
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/main3.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+int main() // return type of main should be void
+{
+ return 1;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/matrix.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/matrix.V110.frag
new file mode 100644
index 00000000..19ad3dce
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/matrix.V110.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ mat4 m;
+ mat4 m1 = mat4(m);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/normal.vert b/tests/spec/glsl-es-1.00/compiler/shaders/normal.vert
new file mode 100644
index 00000000..5c45b6e5
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/normal.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_Normal = vec3(1.0,2.0,3.0); // cannot be modified an attribute
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/parser1.vert b/tests/spec/glsl-es-1.00/compiler/shaders/parser1.vert
new file mode 100644
index 00000000..020a6739
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/parser1.vert
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int a // semicolon missing at the end of the statement
+ gl_Position = vec4(a);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/parser10.frag b/tests/spec/glsl-es-1.00/compiler/shaders/parser10.frag
new file mode 100644
index 00000000..83036fdd
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/parser10.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ 5 += 5; // l-value missing
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/parser3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/parser3.frag
new file mode 100644
index 00000000..2d8cf09f
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/parser3.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f[3];
+ f[3] = 1.0; // index of array greater than the size of the array
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/parser4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/parser4.frag
new file mode 100644
index 00000000..ff139baa
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/parser4.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ const int i = 5;
+ i++; // const cannot be modified
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/parser5.frag b/tests/spec/glsl-es-1.00/compiler/shaders/parser5.frag
new file mode 100644
index 00000000..61feaef4
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/parser5.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec2 v;
+ v.z = 1.2; // vec2 does not have a z component
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/parser6.frag b/tests/spec/glsl-es-1.00/compiler/shaders/parser6.frag
new file mode 100644
index 00000000..6131d11c
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/parser6.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f1,f2,f3;
+ f3 = f1 > f2; // f1 > f2 result in a bool that cannot be assigned to a float
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/parser7.frag b/tests/spec/glsl-es-1.00/compiler/shaders/parser7.frag
new file mode 100644
index 00000000..e6ab2d69
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/parser7.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ mat2 m1,m2;
+ bool b = m1 > m2; // greater-than operator can operate on matrices, however, equal (==) and not equal (!=) operators can be used with matrices
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/parser8.frag b/tests/spec/glsl-es-1.00/compiler/shaders/parser8.frag
new file mode 100644
index 00000000..803ef60a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/parser8.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec2 v2;
+ vec3 v3;
+ bool b = v2 == v3; // equal operator cannot operator on vectors of different sizes
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/parser9.frag b/tests/spec/glsl-es-1.00/compiler/shaders/parser9.frag
new file mode 100644
index 00000000..f19d4c21
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/parser9.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f1,f2;
+ bool b = f1 && f2; // &&, || and ^^ operate on a boolean expression only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/preprocess0.frag b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess0.frag
new file mode 100644
index 00000000..25acacc2
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess0.frag
@@ -0,0 +1,61 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+//test for else elif mismatch
+#define test(x,y) (x+y)
+
+void main(void){
+ int sum =0;
+ #define x 8
+ #endif
+ #if (x==8)
+ #undef x
+ #endif
+
+ #if 1
+ #undef x
+ #endif
+
+ #if 1
+ #define t4 4
+ #endif
+
+ sum=test(3,6)+t4;
+ #if 1
+ #if 1
+ #if 1
+ #if 1
+ #if 0
+ #undef test
+ #else
+ #if 1
+ #undef test
+ #endif
+ #if 0
+ #undef test
+ #else
+ #if 0
+ #undef test
+ #else
+ #if 1
+ #undef test
+ #else
+ #undef test
+ #else
+ #jdhgj
+ #endif
+ #endif
+ #endif
+ #endif
+ #endif
+ #endif
+ #endif
+ #endif
+
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/preprocess1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess1.frag
new file mode 100644
index 00000000..ac968248
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess1.frag
@@ -0,0 +1,62 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+// tests for macro redifinition (t2) and the #if and #else nestings.
+// takes care of elif also.
+
+#define t1 (1+2)
+#define t2 2
+#define t2 3
+
+// testing the if depth
+#if (t1==3)
+ #define t3 3
+ #if defined t2
+ #define t4 4
+ #if defined(t3)
+ #define t5 5
+ #ifdef t5
+ #define t6 6
+ #ifndef t7
+ #define t7 7
+ #else
+ #define t8 8
+ #endif
+ #endif
+ #else
+ #ifndef t8
+ #define t8 8
+ #elif (t8==8)
+ #define t9 9
+ #else
+ #if defined t7
+ #define t9 9
+ #endif
+ #endif
+ #endif
+ #else
+ #define t10 10
+ #endif
+#endif
+
+
+#define t8 8
+#define t9 9
+#define t10 10
+
+void main(void)
+{
+ int sum=1 ;
+ sum = t1+t2;
+ sum = t3+t4;
+ sum = t5+t6;
+ sum = t7+t8;
+ sum = t9+t10;
+}
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/preprocess10.frag b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess10.frag
new file mode 100644
index 00000000..a4ab6930
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess10.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+/* The program should terminate with an error message and not get into an
+ infinite loop */
+#ifdef name
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/preprocess2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess2.frag
new file mode 100644
index 00000000..8d06ca72
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess2.frag
@@ -0,0 +1,58 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+// #line directive-- test cases.
+// chks for Invalid directives, all possible #line errors
+// Also checks the correct verions of #line dorective.
+
+#define t1 1
+#define t2 2
+
+#
+#
+#
+#
+#line 8
+#line ""
+#line 3 3
+
+#linekfj
+#line c c
+#line t1 t2
+#line 77 89
+#line 65.4
+#line message to the user
+#line
+#line345
+
+void main(void)
+{
+ int sum =1;
+ sum = __LINE__;
+ sum = __FILE__;
+ #line 4 5
+ sum = __LINE__;
+ sum = __FILE__;
+ #line 9
+ sum = __LINE__ + __FILE__ ;
+ sum = __FILE__;
+ #
+ #
+ sum = __VERSION__;
+ sum = sum + __LINE__ ;
+ #line 4 5
+ #line 5 8
+ sum = __LINE__;
+ sum = __FILE__;
+ sum = __VERSION__;
+
+}
+
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/preprocess3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess3.frag
new file mode 100644
index 00000000..cd1522e2
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess3.frag
@@ -0,0 +1,41 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+// simple macro expansions.
+// Tests for Too few macro arguments, too many macro arguments.
+// Macros with no arguments.
+
+#define t1 -1
+#define t2 2
+
+#define test -258
+#define test1 (test*test)
+#define test2(x) (x+test1)
+#define test3() (test2(8)*(test*test1))
+#define test4(x,y) (x+y)
+
+void main(void)
+{
+ int sum =0;
+ sum = test3();
+ sum = test3(3);
+
+ sum = test2(9);
+ sum = test2(9,8);
+
+ sum = test4;
+ sum = test2(8,5,78,9);
+ sum = sum + test1;
+ sum = 8+58+sum;
+ sum = sum +test;
+ sum = (t1+t2);
+ sum = test4(test3(),test2(test3()));
+ sum = test4(3,8,5);
+ sum = test4();
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/preprocess4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess4.frag
new file mode 100644
index 00000000..28ccb3c0
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess4.frag
@@ -0,0 +1,58 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+// #error and #pragma directives -- test cases.
+// tests for errors in #pragma directive.
+
+#pragma optimize(on)
+#pragma debug(off)
+
+int foo(int);
+
+void main(void)
+{
+ int sum =0;
+ #error ;
+ #error 78
+ #error c
+ #error "message to the user "
+ #error message to the user
+ #error
+ #error
+ #define t1 1
+ sum = t1*t1;
+ foo(sum);
+
+}
+
+#pragma optimize(off)
+#pragma bind(on)
+#pragma pack(off)
+
+int foo(int test)
+{
+ int binding=0;
+ binding = test;
+ return binding;
+}
+
+#line 4
+#pragma
+#line 5 6
+#pragma optmimize on
+#pragma debug off
+#pragma debug(off
+#line 9
+#prgma bind(off)
+#pragma bind
+#pragma (on)
+#pragma on (on)
+#pragma optmize(on
+
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/preprocess6.frag b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess6.frag
new file mode 100644
index 00000000..40134984
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess6.frag
@@ -0,0 +1,32 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+// operator precedence and some macro expansions.
+
+#define test (1+2)
+#define test1 (test*4)
+#define test2 (test1/test)
+#define test3 (-1+2*3/4%test)
+#define test4 (test & test1 |test2)
+#define test5 (!8+~4+4-6)
+#define test6 (test1>>1)
+#define test7 (test1<<1)
+#define test8 (test2^6)
+#define test9 (test4 || test5 && test1)
+#define test10 (0)
+
+void main(void)
+{
+ int sum =0;
+ sum = test4;
+ sum = test3*test2+test1-test;
+ sum = test3/test6 + test4*test7 - test7 % test9;
+ sum = test10*test5;
+}
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/preprocess7.frag b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess7.frag
new file mode 100644
index 00000000..8ab88b5d
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/preprocess7.frag
@@ -0,0 +1,49 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+// testing for char constants in #if and #elif
+// Also checking whether reserved words can be redefined.
+
+#define t1 c
+#define t2 d
+#define asm a
+
+ #if(t1==c)
+ #define t3 3
+ #elif(t1==d)
+ #define t4 4
+ #elif(t2==c)
+ #define t5 5
+ #endif
+
+ #ifndef t1
+ #define t7 7
+ #elif (t2==d)
+ #define t6 6
+ #endif
+
+ #if (t2=='d')
+ #define half 5
+ #else
+ #define half 8
+ #endif
+
+ #ifdef t22
+ #define x 5
+ #endif
+
+ void main(void)
+ {
+ int sum =0,a=9;
+
+ sum = half + sum;
+ sum = asm + a;
+
+ }
+
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/scoping1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/scoping1.frag
new file mode 100644
index 00000000..bfad2bae
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/scoping1.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ bool b;
+ if (b)
+ {
+ int i = 1;
+ i++;
+ }
+ i++; // i is not declared in this scope
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/scoping2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/scoping2.frag
new file mode 100644
index 00000000..0aa4a36e
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/scoping2.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ {
+ int i = 1;
+ i++;
+ }
+ i++; // i is not declared in this scope
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct1.frag
new file mode 100644
index 00000000..f42dc065
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct1.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ int i;
+} uniform uniformStruct; // uniform keyword should be used before the keyword struct
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct10.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct10.frag
new file mode 100644
index 00000000..6154559f
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct10.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ int i;
+} s1[2];
+
+void main()
+{
+ s1.i = 1; // s1 is an array. s1[0].i is correct to use
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct11.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct11.frag
new file mode 100644
index 00000000..7d612b4d
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct11.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ int i;
+} s1;
+
+void main()
+{
+ s1 = -s1; // cannot calculate negative of a structure
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct2.frag
new file mode 100644
index 00000000..026d8476
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct2.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ int i = 1.0; // struct members cannot be initialized at the time of structure declaration
+} s1;
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct3.frag
new file mode 100644
index 00000000..d006d139
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct3.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ uniform int i; // structure members cannot be declared with const qualifier
+} s1;
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct4.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct4.frag
new file mode 100644
index 00000000..69c9b9e6
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct4.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ const int i = 1; // structure members cannot be declared with const qualifier
+} s1;
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct5.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct5.frag
new file mode 100644
index 00000000..b74f4682
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct5.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+uniform struct s {
+ int i;
+} s1;
+
+void main()
+{
+ s1.i = 1; // uniforms are read only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct6.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct6.frag
new file mode 100644
index 00000000..0a82cb2e
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct6.frag
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+varying struct s {
+ int i;
+} s1; // structures cannot be declared with varying qualifier
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct7.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct7.frag
new file mode 100644
index 00000000..acf20a77
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct7.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ struct s {
+ } s1; // structures have to be declared with atleast one member
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct8.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct8.frag
new file mode 100644
index 00000000..9f3ab876
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct8.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+struct s {
+ int i;
+} s1;
+
+struct ss {
+ int i;
+} s2;
+
+void main()
+{
+ s1 = s2; // two different structures cannot be assigned to each other
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/struct9.frag b/tests/spec/glsl-es-1.00/compiler/shaders/struct9.frag
new file mode 100644
index 00000000..6e8242bc
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/struct9.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+const struct s {
+ int i;
+} s1 = s(1);
+
+void main()
+{
+ s1.i = 1; // const struct members cannot be modified
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/swizzle1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/swizzle1.frag
new file mode 100644
index 00000000..5fcc7beb
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/swizzle1.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec2 v;
+ v.xy = 1.2; // swizzle needs two values, v.xy = vec2(1.2) is correct
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/swizzle2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/swizzle2.frag
new file mode 100644
index 00000000..02d7f1ff
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/swizzle2.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec2 v;
+ v.xx = vec2(1,1); // x cannot be used twice in l-value
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/swizzle3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/swizzle3.frag
new file mode 100644
index 00000000..27c8aa14
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/swizzle3.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec2 v;
+ vec3 v3 = v.xyz; // v is a vec2 and does not have a z component
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/typecast.frag b/tests/spec/glsl-es-1.00/compiler/shaders/typecast.frag
new file mode 100644
index 00000000..b7714c05
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/typecast.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ vec4 v;
+ vec4 v1 = (vec4) v; // incorrect typecasting, vec4(v) is correct
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/uniform.frag b/tests/spec/glsl-es-1.00/compiler/shaders/uniform.frag
new file mode 100644
index 00000000..a733fccf
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/uniform.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ uniform float foo; // uniforms can only be declared at a global scope
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/uniform1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/uniform1.frag
new file mode 100644
index 00000000..a9cfd4bc
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/uniform1.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_Fog.density = 1.0; // cannot modify a uniform
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/varying.frag b/tests/spec/glsl-es-1.00/compiler/shaders/varying.frag
new file mode 100644
index 00000000..e5b7982b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/varying.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ varying float foo; // varyings can only be declared at a global scope
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/varying1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/varying1.frag
new file mode 100644
index 00000000..c2ad9660
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/varying1.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+varying float foo;
+
+void main()
+{
+ foo = 5.0; // varying cannot be written by a fragment shader
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/varying2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/varying2.frag
new file mode 100644
index 00000000..54ae8fb3
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/varying2.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+varying int foo; // varyings cannot be int or bool
+
+void main()
+{
+
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/varying3.frag b/tests/spec/glsl-es-1.00/compiler/shaders/varying3.frag
new file mode 100644
index 00000000..10578630
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/varying3.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+varying vec4 v = gl_TexCoord[0]; // varyings cannot be initialized
+
+void main()
+{
+
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/vector.frag b/tests/spec/glsl-es-1.00/compiler/shaders/vector.frag
new file mode 100644
index 00000000..867f71f7
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/vector.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ ivec4 v4;
+ v4 = v4 + 2.0;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/version2.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/version2.V110.frag
new file mode 100644
index 00000000..275e195a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/version2.V110.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+#pragma debug(on)
+#version 110 // error #version should be the first statement in the program
+
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/version3.V110.frag b/tests/spec/glsl-es-1.00/compiler/shaders/version3.V110.frag
new file mode 100644
index 00000000..84bdcaeb
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/version3.V110.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+/* This is a comment*/ int i; // This is a global decl
+#version 110 // error #version should be the first statement in the program
+
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/vertex.vert b/tests/spec/glsl-es-1.00/compiler/shaders/vertex.vert
new file mode 100644
index 00000000..8126e15b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/vertex.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_Vertex = vec4(1.0,2.0,3.0, 4.0); // cannot modify an attribute
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly.frag b/tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly.frag
new file mode 100644
index 00000000..a47ff329
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_PointSize = 4.0; // can be used in vertex shader only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly1.frag
new file mode 100644
index 00000000..600c8de6
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly1.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_ClipVertex = vec4(1); // can be used in vertex shader only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly2.frag
new file mode 100644
index 00000000..875c01fb
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/vertexOnly2.frag
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ gl_Position = vec4(4.0); // can be used in vertex shader only
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/while.frag b/tests/spec/glsl-es-1.00/compiler/shaders/while.frag
new file mode 100644
index 00000000..2c32a60a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/while.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ float f;
+ while(f) { // condition should be boolean
+ }
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/while1.frag b/tests/spec/glsl-es-1.00/compiler/shaders/while1.frag
new file mode 100644
index 00000000..f024767a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/while1.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ int i;
+ while(i) { // condition should be boolean
+ }
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/shaders/while2.frag b/tests/spec/glsl-es-1.00/compiler/shaders/while2.frag
new file mode 100644
index 00000000..1d9e766d
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/shaders/while2.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.00
+//
+// # NOTE: Config section was auto-generated from file
+// # NOTE: 'glslparser.tests' at git revision
+// # NOTE: 6cc17ae70b70d150aa1751f8e28db7b2a9bd50f0
+// [end config]
+
+void main()
+{
+ while(float f = 5.0) { // cannot declare variables in condition
+ }
+}