aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkSLGLSLTest.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2018-01-23 16:39:42 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 22:23:30 +0000
commit29b3434e48ca41672266ac40f5b9e8f8a0405cb5 (patch)
tree2524748fc90c30ae887e6a086e6bb76ffaa05e81 /tests/SkSLGLSLTest.cpp
parent8524c30a971cd22fe1e3e0fd3db5988fe23272b6 (diff)
Revert "converted vertex shaders to device coords"
This reverts commit e7e81c15c144b8133f696d0744ed9f7e8d06e936. Reason for revert: Chrome perf regressions Bug: skia: Change-Id: I17fadc97c4b8e80bfdccbf123554614a00c58473 Reviewed-on: https://skia-review.googlesource.com/99040 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.cpp67
1 files changed, 0 insertions, 67 deletions
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp
index 62c5cd6955..53710c9516 100644
--- a/tests/SkSLGLSLTest.cpp
+++ b/tests/SkSLGLSLTest.cpp
@@ -1072,21 +1072,6 @@ DEF_TEST(SkSLFragCoord, r) {
SkSL::Program::kVertex_Kind);
test(r,
- "in uniform float4 sk_RTAdjust; in float4 pos; void main() { sk_Position = pos; }",
- *SkSL::ShaderCapsFactory::CannotUseFragCoord(),
- "#version 400\n"
- "out vec4 sk_FragCoord_Workaround;\n"
- "in uniform vec4 sk_RTAdjust;\n"
- "in vec4 pos;\n"
- "void main() {\n"
- " sk_FragCoord_Workaround = (gl_Position = pos);\n"
- " gl_Position = vec4(gl_Position.x * sk_RTAdjust.x + gl_Position.w * sk_RTAdjust.y, "
- "gl_Position.y * sk_RTAdjust.z + gl_Position.w * sk_RTAdjust.w, 0.0, "
- "gl_Position.w);\n"
- "}\n",
- SkSL::Program::kVertex_Kind);
-
- test(r,
"void main() { sk_FragColor.xy = sk_FragCoord.xy; }",
*SkSL::ShaderCapsFactory::CannotUseFragCoord(),
"#version 400\n"
@@ -1754,58 +1739,6 @@ DEF_TEST(SkSLForceHighPrecision, r) {
&inputs);
}
-DEF_TEST(SkSLNormalization, r) {
- test(r,
- "uniform float4 sk_RTAdjust; void main() { sk_Position = half4(1); }",
- *SkSL::ShaderCapsFactory::Default(),
- "#version 400\n"
- "uniform vec4 sk_RTAdjust;\n"
- "void main() {\n"
- " gl_Position = vec4(1.0);\n"
- " gl_Position = vec4(gl_Position.x * sk_RTAdjust.x + gl_Position.w * sk_RTAdjust.y, "
- "gl_Position.y * sk_RTAdjust.z + gl_Position.w * sk_RTAdjust.w, "
- "0.0, "
- "gl_Position.w);\n"
- "}\n",
- SkSL::Program::kVertex_Kind);
- test(r,
- "uniform float4 sk_RTAdjust;"
- "layout(points) in;"
- "layout(invocations = 2) in;"
- "layout(line_strip, max_vertices = 2) out;"
- "void main() {"
- "sk_Position = sk_in[0].sk_Position + float4(-0.5, 0, 0, sk_InvocationID);"
- "EmitVertex();"
- "sk_Position = sk_in[0].sk_Position + float4(0.5, 0, 0, sk_InvocationID);"
- "EmitVertex();"
- "EndPrimitive();"
- "}",
- *SkSL::ShaderCapsFactory::GeometryShaderSupport(),
- "#version 400\n"
- "uniform vec4 sk_RTAdjust;\n"
- "layout (points) in ;\n"
- "layout (invocations = 2) in ;\n"
- "layout (line_strip, max_vertices = 2) out ;\n"
- "void main() {\n"
- " gl_Position = gl_in[0].gl_Position + vec4(-0.5, 0.0, 0.0, float(gl_InvocationID));\n"
- " {\n"
- " gl_Position = vec4(gl_Position.x * sk_RTAdjust.x + gl_Position.w * "
- "sk_RTAdjust.y, gl_Position.y * sk_RTAdjust.z + gl_Position.w * "
- "sk_RTAdjust.w, 0.0, gl_Position.w);\n"
- " EmitVertex();\n"
- " }\n"
- " gl_Position = gl_in[0].gl_Position + vec4(0.5, 0.0, 0.0, float(gl_InvocationID));\n"
- " {\n"
- " gl_Position = vec4(gl_Position.x * sk_RTAdjust.x + gl_Position.w * "
- "sk_RTAdjust.y, gl_Position.y * sk_RTAdjust.z + gl_Position.w * "
- "sk_RTAdjust.w, 0.0, gl_Position.w);\n"
- " EmitVertex();\n"
- " }\n"
- " EndPrimitive();\n"
- "}\n",
- SkSL::Program::kGeometry_Kind);
-}
-
DEF_TEST(SkSLTernaryLValue, r) {
test(r,
"void main() { half r, g; (true ? r : g) = 1; (false ? r : g) = 0; "