diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2016-11-28 12:03:26 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-28 17:53:44 +0000 |
commit | 2b3dab62bccdbf6244aef9103e9e739147af8616 (patch) | |
tree | 989120c1cd65a242045a07ff2e1b4f3b6c9ef521 /tests/SkSLGLSLTest.cpp | |
parent | 343b6772b6cf4715ec1e1f7f604289c0c852a2a7 (diff) |
removed textureProj() and legacy texture functions from sksl
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5120
Change-Id: I21b111d54becaca845134376e54a5a7c0a6cd6c8
Reviewed-on: https://skia-review.googlesource.com/5120
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'tests/SkSLGLSLTest.cpp')
-rw-r--r-- | tests/SkSLGLSLTest.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp index 4a9338113f..52638a5795 100644 --- a/tests/SkSLGLSLTest.cpp +++ b/tests/SkSLGLSLTest.cpp @@ -547,4 +547,46 @@ DEF_TEST(SkSLCaps, r) { "}\n"); } +DEF_TEST(SkSLTexture, r) { + test(r, + "uniform sampler1D one;" + "uniform sampler2D two;" + "void main() {" + "vec4 a = texture(one, 0);" + "vec4 b = texture(two, vec2(0));" + "vec4 c = texture(one, vec2(0));" + "vec4 d = texture(two, vec3(0));" + "}", + *SkSL::GLSLCapsFactory::Default(), + "#version 400\n" + "out vec4 sk_FragColor;\n" + "uniform sampler1D one;\n" + "uniform sampler2D two;\n" + "void main() {\n" + " vec4 a = texture(one, 0.0);\n" + " vec4 b = texture(two, vec2(0.0));\n" + " vec4 c = textureProj(one, vec2(0.0));\n" + " vec4 d = textureProj(two, vec3(0.0));\n" + "}\n"); + test(r, + "uniform sampler1D one;" + "uniform sampler2D two;" + "void main() {" + "vec4 a = texture(one, 0);" + "vec4 b = texture(two, vec2(0));" + "vec4 c = texture(one, vec2(0));" + "vec4 d = texture(two, vec3(0));" + "}", + *SkSL::GLSLCapsFactory::Version110(), + "#version 110\n" + "uniform sampler1D one;\n" + "uniform sampler2D two;\n" + "void main() {\n" + " vec4 a = texture1D(one, 0.0);\n" + " vec4 b = texture2D(two, vec2(0.0));\n" + " vec4 c = texture1DProj(one, vec2(0.0));\n" + " vec4 d = texture2DProj(two, vec3(0.0));\n" + "}\n"); +} + #endif |