aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkSLGLSLTest.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-08-16 22:01:21 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-17 02:23:35 +0000
commit8ac36a577f14158c820bbc673f477a7ce20702e5 (patch)
tree19fd50c4b6b91a01677fe8a5c2c8e990f0568505 /tests/SkSLGLSLTest.cpp
parent88d99c63878c2d3d340120f0321676f72afcb4f0 (diff)
fixed constant vector swizzling
Bug: skia: Change-Id: I2d205bf7242d2223c4939c3e7897db9aba02c705 Reviewed-on: https://skia-review.googlesource.com/35640 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'tests/SkSLGLSLTest.cpp')
-rw-r--r--tests/SkSLGLSLTest.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp
index 73c6dccbde..e4088ceee7 100644
--- a/tests/SkSLGLSLTest.cpp
+++ b/tests/SkSLGLSLTest.cpp
@@ -1573,4 +1573,17 @@ DEF_TEST(SkSLNumberConversions, r) {
"float f2f = f;\n");
}
+DEF_TEST(SkSLConstantSwizzleComparison, r) {
+ test(r,
+ "void main() { if (half4(1.0).x == half4(1.0).y) { sk_FragColor = half4(1.0); } }",
+ *SkSL::ShaderCapsFactory::Default(),
+ "#version 400\n"
+ "out vec4 sk_FragColor;\n"
+ "void main() {\n"
+ " {\n"
+ " sk_FragColor = vec4(1.0);\n"
+ " }\n"
+ "}\n");
+}
+
#endif