diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2018-03-29 16:46:56 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-01 21:29:08 +0000 |
commit | c6a19f1d044e4e23d3f0a608aa91da55376512bf (patch) | |
tree | cf7ea91e5ae7faaf6a49794c298a41cb41f122fd /tests/SkSLGLSLTest.cpp | |
parent | 5614ce1897320b48a2d850fdcb15018a14fdd21d (diff) |
fix for frexp dataflow analysis
Bug: skia:
Change-Id: Ic20bedadfbf37fd78ce03872ece2d9552307cfcd
Reviewed-on: https://skia-review.googlesource.com/117243
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'tests/SkSLGLSLTest.cpp')
-rw-r--r-- | tests/SkSLGLSLTest.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp index 27797b6189..0b9ed35006 100644 --- a/tests/SkSLGLSLTest.cpp +++ b/tests/SkSLGLSLTest.cpp @@ -1945,4 +1945,21 @@ DEF_TEST(SkSLIncompleteShortIntPrecision, r) { SkSL::Program::kFragment_Kind); } +DEF_TEST(SkSLFrExp, r) { + test(r, + "void main() {" + " int exp;" + " float foo = frexp(0.5, exp);" + " sk_FragColor = float4(exp);" + "}", + *SkSL::ShaderCapsFactory::Default(), + "#version 400\n" + "out vec4 sk_FragColor;\n" + "void main() {\n" + " int exp;\n" + " float foo = frexp(0.5, exp);\n" + " sk_FragColor = vec4(float(exp));\n" + "}\n"); +} + #endif |