aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkSLGLSLTest.cpp
diff options
context:
space:
mode:
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