summaryrefslogtreecommitdiff
path: root/tests/glslparsertest
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-04-08 16:58:46 -0700
committerKenneth Graunke <kenneth@whitecape.org>2014-04-11 12:39:14 -0700
commit64d4c6f950dd16aea48e9c9a1fdb339ab49911e4 (patch)
tree3db08d3f543b8a2e94e3e4835b5ef10e6870ead0 /tests/glslparsertest
parent3456230244cc7446fc3696dfaf748076f9a196e5 (diff)
Add a piglit test which reproduces an opt_vectorizer bug.
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@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'tests/glslparsertest')
-rw-r--r--tests/glslparsertest/glsl2/repeated-channel-assignment.vert17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/glslparsertest/glsl2/repeated-channel-assignment.vert b/tests/glslparsertest/glsl2/repeated-channel-assignment.vert
new file mode 100644
index 000000000..e7ba9613f
--- /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;
+}