aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2013-01-07 14:44:50 -0600
committerTom Gall <tom.gall@linaro.org>2013-01-23 14:08:50 -0600
commit83aebec9883fd874d8c02aeeeb77745faf0fc756 (patch)
tree588a97b7e01f449a152df7efe5dc29f405b3bb53
parentff65d27812d01a176c560d826b299bf50038d34c (diff)
gles2: glslparser tests ported to glsl es 1.00
-rw-r--r--tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-attribute-01.vert17
-rw-r--r--tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-attribute-02.vert19
-rw-r--r--tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-point-coord.frag18
-rw-r--r--tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-varying-01.frag14
-rw-r--r--tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-varying-02.frag19
5 files changed, 87 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-attribute-01.vert b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-attribute-01.vert
new file mode 100644
index 00000000..7ebd324a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-attribute-01.vert
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// glsles_version: 1.00
+// [end config]
+//
+// From section 4.3.4 of the GLSL 1.20 spec:
+// Attribute variables are read-only as far as the vertex shader is
+// concerned.
+
+
+attribute float x;
+
+float f() {
+ x = 0.0;
+ return x;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-attribute-02.vert b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-attribute-02.vert
new file mode 100644
index 00000000..1182d7ce
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-attribute-02.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// glsles_version: 1.00
+// [end config]
+//
+// From section 4.3.4 of the GLSL 1.20 spec:
+// Attribute variables are read-only as far as the vertex shader is
+// concerned.
+
+attribute float x;
+
+void f(out float y) {
+ y = 0.0;
+}
+
+void g() {
+ f(x);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-point-coord.frag b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-point-coord.frag
new file mode 100644
index 00000000..b909f94b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-point-coord.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// glsles_version: 1.00
+// [end config]
+//
+// From section 4.3.6 of the GLSL 1.20 spec:
+// A fragment shader can not write to a varying variable.
+//
+// From section 7.6 of the GLSL 1.20 spec:
+// The following varying variables are available to read from in a fragment shader.
+// ...
+// varying vec2 gl_PointCoord;
+
+
+void g() {
+ gl_PointCoord = vec2(0.0);
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-varying-01.frag b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-varying-01.frag
new file mode 100644
index 00000000..c2f320ce
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-varying-01.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// glsles_version: 1.00
+// [end config]
+//
+// From section 4.3.6 of the GLSL 1.20 spec:
+// A fragment shader can not write to a varying variable.
+
+varying float x;
+
+void g() {
+ x = 0.0;
+}
diff --git a/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-varying-02.frag b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-varying-02.frag
new file mode 100644
index 00000000..1907ba04
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/storage-qualifiers/static-write-varying-02.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.20
+// glsles_version: 1.00
+// [end config]
+//
+// From section 4.3.6 of the GLSL 1.20 spec:
+// A fragment shader can not write to a varying variable.
+
+
+varying float x;
+
+void f(out float y) {
+ y = 0.0;
+}
+
+void g() {
+ f(x);
+}