[Piglit] [PATCH] Add a piglit test which reproduces an opt_vectorizer bug.

Kenneth Graunke kenneth at whitecape.org
Tue Apr 8 17:00:56 PDT 2014


This reproduces an ir_validator failure in Serious Sam 3 shaders caused
by the vectorizer pass, which I uncovered while doing unrelated work.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: Matt Turner <mattst88 at gmail.com>
---
 .../glsl2/repeated-channel-assignment.vert              | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tests/glslparsertest/glsl2/repeated-channel-assignment.vert

diff --git a/tests/glslparsertest/glsl2/repeated-channel-assignment.vert b/tests/glslparsertest/glsl2/repeated-channel-assignment.vert
new file mode 100644
index 0000000..e7ba961
--- /dev/null
+++ b/tests/glslparsertest/glsl2/repeated-channel-assignment.vert
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// [end config]
+
+uniform vec4 u;
+
+void main()
+{
+    vec2 v = vec2(0);
+
+    v -= u.xy;
+    v.x += u.x;
+    v.x += u.x;
+
+    gl_Position = v.xxyy;
+}
-- 
1.9.1



More information about the Piglit mailing list