diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-02-08 15:49:56 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-09 14:13:57 +0000 |
commit | 8b8c76506a9a3b07246e6c2770e35dfc413da97a (patch) | |
tree | 4efcf140a33f9783a113e3dd45414e5aa67b36a7 /tests/SkSLGLSLTest.cpp | |
parent | 52bab3047b50c388b33a55faa42bf55df2a3d814 (diff) |
added support for sk_ClipDistance
Change-Id: I14fd921cace23ab37a1e5e9d5da94d92d3688680
Reviewed-on: https://skia-review.googlesource.com/8225
Reviewed-by: Chris Dalton <csmartdalton@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 |