aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkSLGLSLTest.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-09-15 16:55:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-15 21:22:54 +0000
commit9752c3c3079140d7dbcf1fb2feb513f1e139a03a (patch)
tree1600689dfb45148c7cf610205f5a56346c5cfdf3 /tests/SkSLGLSLTest.cpp
parent7031b247c9fe0cb8fa32129f9bc24fea2043cee2 (diff)
Minor fixes to SkSL precisions
No-Presubmit: true No-Tree-Checks: true Bug: skia: Change-Id: Ife95d3ba457f79c00bf4fdd54af898a3a50402aa Reviewed-on: https://skia-review.googlesource.com/47241 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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp
index 851c0e8a34..bfcedacc90 100644
--- a/tests/SkSLGLSLTest.cpp
+++ b/tests/SkSLGLSLTest.cpp
@@ -321,6 +321,7 @@ DEF_TEST(SkSLUsesPrecisionModifiers, r) {
"sk_FragColor.rg = half2(x, y); }",
*SkSL::ShaderCapsFactory::UsesPrecisionModifiers(),
"#version 400\n"
+ "precision mediump float;\n"
"out mediump vec4 sk_FragColor;\n"
"void main() {\n"
" mediump float x = 0.75;\n"
@@ -510,6 +511,7 @@ DEF_TEST(SkSLDerivatives, r) {
"void main() { sk_FragColor.r = 1; }",
*SkSL::ShaderCapsFactory::ShaderDerivativeExtensionString(),
"#version 400\n"
+ "precision mediump float;\n"
"out mediump vec4 sk_FragColor;\n"
"void main() {\n"
" sk_FragColor.x = 1.0;\n"
@@ -519,6 +521,7 @@ DEF_TEST(SkSLDerivatives, r) {
*SkSL::ShaderCapsFactory::ShaderDerivativeExtensionString(),
"#version 400\n"
"#extension GL_OES_standard_derivatives : require\n"
+ "precision mediump float;\n"
"out mediump vec4 sk_FragColor;\n"
"void main() {\n"
" sk_FragColor.x = dFdx(1.0);\n"
@@ -1485,6 +1488,7 @@ DEF_TEST(SkSLTypePrecision, r) {
"half2x4 h24 = half2x4(1, 2, 3, 4, 5, 6, 7, 8);",
*SkSL::ShaderCapsFactory::UsesPrecisionModifiers(),
"#version 400\n"
+ "precision mediump float;\n"
"out mediump vec4 sk_FragColor;\n"
"highp float f = 1.0;\n"
"mediump float h = 2.0;\n"
@@ -1578,6 +1582,7 @@ DEF_TEST(SkSLForceHighPrecision, r) {
"void main() { half x = sqrt(1); half4 y = half4(x); sk_FragColor = y; }",
*SkSL::ShaderCapsFactory::UsesPrecisionModifiers(),
"#version 400\n"
+ "precision mediump float;\n"
"out mediump vec4 sk_FragColor;\n"
"void main() {\n"
" mediump float x = sqrt(1.0);\n"
@@ -1593,6 +1598,7 @@ DEF_TEST(SkSLForceHighPrecision, r) {
"void main() { half x = sqrt(1); half4 y = half4(x); sk_FragColor = y; }",
settings,
"#version 400\n"
+ "precision mediump float;\n"
"out mediump vec4 sk_FragColor;\n"
"void main() {\n"
" highp float x = sqrt(1.0);\n"