diff options
Diffstat (limited to 'tests/SkSLGLSLTest.cpp')
-rw-r--r-- | tests/SkSLGLSLTest.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp index 275fb2b017..5b083fa511 100644 --- a/tests/SkSLGLSLTest.cpp +++ b/tests/SkSLGLSLTest.cpp @@ -1154,6 +1154,17 @@ DEF_TEST(SkSLFragCoord, r) { "}\n"); } +DEF_TEST(SkSLClockwise, r) { + test(r, + "void main() { sk_FragColor = half4(sk_Clockwise ? +1 : -1); }", + *SkSL::ShaderCapsFactory::Default(), + "#version 400\n" + "out vec4 sk_FragColor;\n" + "void main() {\n" + " sk_FragColor = vec4(float(gl_FrontFacing ? 1 : -1));\n" + "}\n"); +} + DEF_TEST(SkSLVertexID, r) { test(r, "out int id; void main() { id = sk_VertexID; }", |