[Piglit] [PATCH] glsl: Try some chained assignments
Ian Romanick
idr at freedesktop.org
Fri Jan 24 10:28:03 PST 2014
From: Ian Romanick <ian.d.romanick at intel.com>
Mesa currently passes the chained-assignment.vert, but it fails
chained-assignment-with-array-deref.vert with:
0:5(12): error: value of type vec4 cannot be assigned to variable of type float
It seems the type checker is getting confused by the array
dereference.
I have been told that cases similar to
chained-assignment-with-array-deref pass on all other known desktop
OpenGL implementations.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
.../chained-assignment-with-array-deref.vert | 10 ++++++++++
.../compiler/assignment-operators/chained-assignment.vert | 10 ++++++++++
2 files changed, 20 insertions(+)
create mode 100644 tests/spec/glsl-1.10/compiler/assignment-operators/chained-assignment-with-array-deref.vert
create mode 100644 tests/spec/glsl-1.10/compiler/assignment-operators/chained-assignment.vert
diff --git a/tests/spec/glsl-1.10/compiler/assignment-operators/chained-assignment-with-array-deref.vert b/tests/spec/glsl-1.10/compiler/assignment-operators/chained-assignment-with-array-deref.vert
new file mode 100644
index 0000000..1e3a450
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/assignment-operators/chained-assignment-with-array-deref.vert
@@ -0,0 +1,10 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+void foo(inout vec4 a, float b)
+{
+ a[0] = a[1] = a[2] = b;
+}
diff --git a/tests/spec/glsl-1.10/compiler/assignment-operators/chained-assignment.vert b/tests/spec/glsl-1.10/compiler/assignment-operators/chained-assignment.vert
new file mode 100644
index 0000000..5a4c02b
--- /dev/null
+++ b/tests/spec/glsl-1.10/compiler/assignment-operators/chained-assignment.vert
@@ -0,0 +1,10 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.10
+ * [end config]
+ */
+
+void foo(inout float a, inout float b, float c)
+{
+ a = b = c;
+}
--
1.8.1.4
More information about the Piglit
mailing list