diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-02-09 10:15:25 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-09 19:29:33 +0000 |
commit | 67d64605d3421404a94c0717fdff194730579873 (patch) | |
tree | 7ffd92cae8a120704da08be7226c30b120e40d9f /tests/SkSLGLSLTest.cpp | |
parent | 5d4cd9ea8818f65bb4878c050dbdb9dcd48505ad (diff) |
added support for sk_ClipDistance
Change-Id: I9ea202679211b98cf98165c8609f24f9b4e14b66
Reviewed-on: https://skia-review.googlesource.com/8247
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.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp index 671f6d849b..a0cc7d559e 100644 --- a/tests/SkSLGLSLTest.cpp +++ b/tests/SkSLGLSLTest.cpp @@ -688,4 +688,22 @@ DEF_TEST(SkSLVertexID, r) { SkSL::Program::kVertex_Kind); } +DEF_TEST(SkSLClipDistance, r) { + test(r, + "void main() { sk_ClipDistance[0] = 0; }", + *SkSL::ShaderCapsFactory::Default(), + "#version 400\n" + "void main() {\n" + " gl_ClipDistance[0] = 0.0;\n" + "}\n", + SkSL::Program::kVertex_Kind); + test(r, + "void main() { sk_FragColor = vec4(sk_ClipDistance[0]); }", + *SkSL::ShaderCapsFactory::Default(), + "#version 400\n" + "out vec4 sk_FragColor;\n" + "void main() {\n" + " sk_FragColor = vec4(gl_ClipDistance[0]);\n" + "}\n"); +} #endif |