[Piglit] [PATCH 1/8] glsl-1.10: Verify that preincrement is not an l-value for assignments

Ian Romanick idr at freedesktop.org
Fri Dec 23 14:48:03 PST 2011


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43975
---
 .../preincrement-float-not-an-lvalue.frag          |   26 ++++++++++++++++++++
 .../preincrement-float-not-an-lvalue.vert          |   26 ++++++++++++++++++++
 .../preincrement-int-not-an-lvalue.frag            |   26 ++++++++++++++++++++
 .../preincrement-int-not-an-lvalue.vert            |   26 ++++++++++++++++++++
 .../preincrement-ivec2-not-an-lvalue.frag          |   26 ++++++++++++++++++++
 .../preincrement-ivec2-not-an-lvalue.vert          |   26 ++++++++++++++++++++
 .../preincrement-ivec3-not-an-lvalue.frag          |   26 ++++++++++++++++++++
 .../preincrement-ivec3-not-an-lvalue.vert          |   26 ++++++++++++++++++++
 .../preincrement-ivec4-not-an-lvalue.frag          |   26 ++++++++++++++++++++
 .../preincrement-ivec4-not-an-lvalue.vert          |   26 ++++++++++++++++++++
 .../preincrement-vec2-not-an-lvalue.frag           |   26 ++++++++++++++++++++
 .../preincrement-vec2-not-an-lvalue.vert           |   26 ++++++++++++++++++++
 .../preincrement-vec3-not-an-lvalue.frag           |   26 ++++++++++++++++++++
 .../preincrement-vec3-not-an-lvalue.vert           |   26 ++++++++++++++++++++
 .../preincrement-vec4-not-an-lvalue.frag           |   26 ++++++++++++++++++++
 .../preincrement-vec4-not-an-lvalue.vert           |   26 ++++++++++++++++++++
 16 files changed, 416 insertions(+), 0 deletions(-)
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-float-not-an-lvalue.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-float-not-an-lvalue.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-int-not-an-lvalue.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-int-not-an-lvalue.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec2-not-an-lvalue.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec2-not-an-lvalue.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec3-not-an-lvalue.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec3-not-an-lvalue.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec4-not-an-lvalue.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec4-not-an-lvalue.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-vec2-not-an-lvalue.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-vec2-not-an-lvalue.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-vec3-not-an-lvalue.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-vec3-not-an-lvalue.vert
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-vec4-not-an-lvalue.frag
 create mode 100644 tests/spec/glsl-1.10/compiler/expressions/preincrement-vec4-not-an-lvalue.vert

diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-float-not-an-lvalue.frag b/tests/spec/glsl-1.10/compiler/expressions/preincrement-float-not-an-lvalue.frag
new file mode 100644
index 0000000..431acc7
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-float-not-an-lvalue.frag
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform float u;
+varying vec4 v;
+
+void main()
+{
+    float t = u;
+
+    ++t = float(v.x);
+    gl_FragColor = vec4(t, v.yzw);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-float-not-an-lvalue.vert b/tests/spec/glsl-1.10/compiler/expressions/preincrement-float-not-an-lvalue.vert
new file mode 100644
index 0000000..9ceb697
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-float-not-an-lvalue.vert
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform float u;
+attribute vec4 v;
+
+void main()
+{
+    float t = u;
+
+    ++t = float(v.x);
+    gl_Position = vec4(t, v.yzw);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-int-not-an-lvalue.frag b/tests/spec/glsl-1.10/compiler/expressions/preincrement-int-not-an-lvalue.frag
new file mode 100644
index 0000000..d6eb1be
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-int-not-an-lvalue.frag
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform int u;
+varying vec4 v;
+
+void main()
+{
+    int t = u;
+
+    ++t = int(v.x);
+    gl_FragColor = vec4(t, v.yzw);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-int-not-an-lvalue.vert b/tests/spec/glsl-1.10/compiler/expressions/preincrement-int-not-an-lvalue.vert
new file mode 100644
index 0000000..e56e698
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-int-not-an-lvalue.vert
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform int u;
+attribute vec4 v;
+
+void main()
+{
+    int t = u;
+
+    ++t = int(v.x);
+    gl_Position = vec4(t, v.yzw);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec2-not-an-lvalue.frag b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec2-not-an-lvalue.frag
new file mode 100644
index 0000000..39bf9a8
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec2-not-an-lvalue.frag
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform ivec2 u;
+varying vec4 v;
+
+void main()
+{
+    ivec2 t = u;
+
+    ++t = ivec2(v.xy);
+    gl_FragColor = vec4(t, v.zw);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec2-not-an-lvalue.vert b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec2-not-an-lvalue.vert
new file mode 100644
index 0000000..e088bf2
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec2-not-an-lvalue.vert
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform ivec2 u;
+attribute vec4 v;
+
+void main()
+{
+    ivec2 t = u;
+
+    ++t = ivec2(v.xy);
+    gl_Position = vec4(t, v.zw);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec3-not-an-lvalue.frag b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec3-not-an-lvalue.frag
new file mode 100644
index 0000000..04f6717
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec3-not-an-lvalue.frag
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform ivec3 u;
+varying vec4 v;
+
+void main()
+{
+    ivec3 t = u;
+
+    ++t = ivec3(v.xyz);
+    gl_FragColor = vec4(t, v.w);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec3-not-an-lvalue.vert b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec3-not-an-lvalue.vert
new file mode 100644
index 0000000..e115e32
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec3-not-an-lvalue.vert
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform ivec3 u;
+attribute vec4 v;
+
+void main()
+{
+    ivec3 t = u;
+
+    ++t = ivec3(v.xyz);
+    gl_Position = vec4(t, v.w);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec4-not-an-lvalue.frag b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec4-not-an-lvalue.frag
new file mode 100644
index 0000000..129eec0
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec4-not-an-lvalue.frag
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform ivec4 u;
+varying vec4 v;
+
+void main()
+{
+    ivec4 t = u;
+
+    ++t = ivec4(v);
+    gl_FragColor = vec4(t);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec4-not-an-lvalue.vert b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec4-not-an-lvalue.vert
new file mode 100644
index 0000000..d280984
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-ivec4-not-an-lvalue.vert
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform ivec4 u;
+attribute vec4 v;
+
+void main()
+{
+    ivec4 t = u;
+
+    ++t = ivec4(v);
+    gl_Position = vec4(t);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec2-not-an-lvalue.frag b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec2-not-an-lvalue.frag
new file mode 100644
index 0000000..770ef49
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec2-not-an-lvalue.frag
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform vec2 u;
+varying vec4 v;
+
+void main()
+{
+    vec2 t = u;
+
+    ++t = vec2(v.xy);
+    gl_FragColor = vec4(t, v.zw);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec2-not-an-lvalue.vert b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec2-not-an-lvalue.vert
new file mode 100644
index 0000000..f889e6b
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec2-not-an-lvalue.vert
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform vec2 u;
+attribute vec4 v;
+
+void main()
+{
+    vec2 t = u;
+
+    ++t = vec2(v.xy);
+    gl_Position = vec4(t, v.zw);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec3-not-an-lvalue.frag b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec3-not-an-lvalue.frag
new file mode 100644
index 0000000..10744e9
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec3-not-an-lvalue.frag
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform vec3 u;
+varying vec4 v;
+
+void main()
+{
+    vec3 t = u;
+
+    ++t = vec3(v.xyz);
+    gl_FragColor = vec4(t, v.w);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec3-not-an-lvalue.vert b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec3-not-an-lvalue.vert
new file mode 100644
index 0000000..6f9e746
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec3-not-an-lvalue.vert
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform vec3 u;
+attribute vec4 v;
+
+void main()
+{
+    vec3 t = u;
+
+    ++t = vec3(v.xyz);
+    gl_Position = vec4(t, v.w);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec4-not-an-lvalue.frag b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec4-not-an-lvalue.frag
new file mode 100644
index 0000000..56eae5a
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec4-not-an-lvalue.frag
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform vec4 u;
+varying vec4 v;
+
+void main()
+{
+    vec4 t = u;
+
+    ++t = vec4(v);
+    gl_FragColor = vec4(t);
+}
diff --git a/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec4-not-an-lvalue.vert b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec4-not-an-lvalue.vert
new file mode 100644
index 0000000..fc2e8b0
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/expressions/preincrement-vec4-not-an-lvalue.vert
@@ -0,0 +1,26 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.10
+ * [end config]
+ *
+ * Page 32 (page 38 of the PDF) of the GLSL 1.10 spec says:
+ *
+ *     "Variables that are built-in types, entire structures, structure
+ *     fields, l-values with the field selector ( . ) applied to select
+ *     components or swizzles without repeated fields, and l-values
+ *     dereferenced with the array subscript operator ( [ ] ) are all
+ *     l-values. Other binary or unary expressions, non-dereferenced arrays,
+ *     function names, swizzles with repeated fields, and constants cannot be
+ *     l-values.  The ternary operator (?:) is also not allowed as an
+ *     l-value."
+ */
+uniform vec4 u;
+attribute vec4 v;
+
+void main()
+{
+    vec4 t = u;
+
+    ++t = vec4(v);
+    gl_Position = vec4(t);
+}
-- 
1.7.6.4



More information about the Piglit mailing list