diff options
Diffstat (limited to 'tests/SkSLGLSLTest.cpp')
-rw-r--r-- | tests/SkSLGLSLTest.cpp | 53 |
1 files changed, 19 insertions, 34 deletions
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp index 678ff13dd3..ba6bbbd13f 100644 --- a/tests/SkSLGLSLTest.cpp +++ b/tests/SkSLGLSLTest.cpp @@ -1340,39 +1340,24 @@ DEF_TEST(SkSLMultipleAssignments, r) { DEF_TEST(SkSLComplexDelete, r) { test(r, - "uniform mat4 colorXform;" - "uniform sampler2D sampler;" - "void main() {" - "vec4 tmpColor;" - "sk_FragColor = vec4(1.0) * (tmpColor = texture(sampler, vec2(1)) , " - "colorXform != mat4(1.0) ? vec4(clamp((mat4(colorXform) * vec4(tmpColor.xyz, 1.0)).xyz, " - "0.0, tmpColor.w), tmpColor.w) : tmpColor);" - "}", - *SkSL::ShaderCapsFactory::Default(), - "#version 400\n" - "out vec4 sk_FragColor;\n" - "uniform mat4 colorXform;\n" - "uniform sampler2D sampler;\n" - "void main() {\n" - " vec4 tmpColor;\n" - " sk_FragColor = (tmpColor = texture(sampler, vec2(1.0)) , colorXform != mat4(1.0) ? " - "vec4(clamp((colorXform * vec4(tmpColor.xyz, 1.0)).xyz, 0.0, tmpColor.w), tmpColor.w) : " - "tmpColor);\n" - "}\n"); -} - -DEF_TEST(SkSLDependentInitializers, r) { - test(r, - "void main() {" - "float x = 0.5, y = x * 2;" - "sk_FragColor = vec4(y);" - "}", - *SkSL::ShaderCapsFactory::Default(), - "#version 400\n" - "out vec4 sk_FragColor;\n" - "void main() {\n" - " sk_FragColor = vec4(1.0);\n" - "}\n"); + "uniform mat4 colorXform;" + "uniform sampler2D sampler;" + "void main() {" + "vec4 tmpColor;" + "sk_FragColor = vec4(1.0) * (tmpColor = texture(sampler, vec2(1)) , " + "colorXform != mat4(1.0) ? vec4(clamp((mat4(colorXform) * vec4(tmpColor.xyz, 1.0)).xyz, " + "0.0, tmpColor.w), tmpColor.w) : tmpColor);" + "}", + *SkSL::ShaderCapsFactory::Default(), + "#version 400\n" + "out vec4 sk_FragColor;\n" + "uniform mat4 colorXform;\n" + "uniform sampler2D sampler;\n" + "void main() {\n" + " vec4 tmpColor;\n" + " sk_FragColor = (tmpColor = texture(sampler, vec2(1.0)) , colorXform != mat4(1.0) ? " + "vec4(clamp((colorXform * vec4(tmpColor.xyz, 1.0)).xyz, 0.0, tmpColor.w), tmpColor.w) : " + "tmpColor);\n" + "}\n"); } - #endif |