aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2016-10-18 08:16:41 -0400
committerGravatar Ethan Nicholas <ethannicholas@google.com>2016-10-18 12:18:33 +0000
commit311742bd0eac6fad150bf8f0a4e2809679464e47 (patch)
treea0c63d19850212b2b4c1353f6305d619dec381e3 /src/gpu/effects
parent4f2a88cdf0e72d6cdf8d870c5130f45c70c48e09 (diff)
skslc now automatically turns on derivatives support
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3569 Change-Id: I211f4a80ced951a0d2f29763f85fe75a5daccff7 Reviewed-on: https://skia-review.googlesource.com/3569 Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrBezierEffect.cpp12
-rw-r--r--src/gpu/effects/GrDistanceFieldGeoProc.cpp7
2 files changed, 0 insertions, 19 deletions
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index 798695d4ec..7f39b927c9 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -136,8 +136,6 @@ void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
switch (fEdgeType) {
case kHairlineAA_GrProcessorEdgeType: {
- SkAssertResult(fragBuilder->enableFeature(
- GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
fragBuilder->codeAppendf("%s = dFdx(%s.xyz);", dklmdx.c_str(), v.fsIn());
fragBuilder->codeAppendf("%s = dFdy(%s.xyz);", dklmdy.c_str(), v.fsIn());
fragBuilder->codeAppendf("%s = 2.0 * %s.x * %s.x - %s.y * %s.z - %s.z * %s.y;",
@@ -165,8 +163,6 @@ void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
break;
}
case kFillAA_GrProcessorEdgeType: {
- SkAssertResult(fragBuilder->enableFeature(
- GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
fragBuilder->codeAppendf("%s = dFdx(%s.xyz);", dklmdx.c_str(), v.fsIn());
fragBuilder->codeAppendf("%s = dFdy(%s.xyz);", dklmdy.c_str(), v.fsIn());
fragBuilder->codeAppendf("%s ="
@@ -374,8 +370,6 @@ void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
switch (fEdgeType) {
case kHairlineAA_GrProcessorEdgeType: {
- SkAssertResult(fragBuilder->enableFeature(
- GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
fragBuilder->codeAppendf("vec2 duvdx = dFdx(%s.xy);", v.fsIn());
fragBuilder->codeAppendf("vec2 duvdy = dFdy(%s.xy);", v.fsIn());
fragBuilder->codeAppendf("vec2 gF = vec2(2.0 * %s.x * duvdx.x - duvdx.y,"
@@ -390,8 +384,6 @@ void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
break;
}
case kFillAA_GrProcessorEdgeType: {
- SkAssertResult(fragBuilder->enableFeature(
- GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
fragBuilder->codeAppendf("vec2 duvdx = dFdx(%s.xy);", v.fsIn());
fragBuilder->codeAppendf("vec2 duvdy = dFdy(%s.xy);", v.fsIn());
fragBuilder->codeAppendf("vec2 gF = vec2(2.0 * %s.x * duvdx.x - duvdx.y,"
@@ -592,8 +584,6 @@ void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
switch (fEdgeType) {
case kHairlineAA_GrProcessorEdgeType: {
- SkAssertResult(fragBuilder->enableFeature(
- GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
fragBuilder->codeAppendf("%s = dFdx(%s.xyz);", dklmdx.c_str(), v.fsIn());
fragBuilder->codeAppendf("%s = dFdy(%s.xyz);", dklmdy.c_str(), v.fsIn());
fragBuilder->codeAppendf("%s = 3.0 * %s.x * %s.x * %s.x - %s.y * %s.z - %s.z * %s.y;",
@@ -620,8 +610,6 @@ void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
break;
}
case kFillAA_GrProcessorEdgeType: {
- SkAssertResult(fragBuilder->enableFeature(
- GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
fragBuilder->codeAppendf("%s = dFdx(%s.xyz);", dklmdx.c_str(), v.fsIn());
fragBuilder->codeAppendf("%s = dFdy(%s.xyz);", dklmdy.c_str(), v.fsIn());
fragBuilder->codeAppendf("%s ="
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index 5404b0c805..7f9fd85e6b 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -35,8 +35,6 @@ public:
const GrDistanceFieldA8TextGeoProc& dfTexEffect =
args.fGP.cast<GrDistanceFieldA8TextGeoProc>();
GrGLSLPPFragmentBuilder* fragBuilder = args.fFragBuilder;
- SkAssertResult(fragBuilder->enableFeature(
- GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
GrGLSLVertexBuilder* vertBuilder = args.fVertBuilder;
GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
@@ -313,8 +311,6 @@ public:
const GrDistanceFieldPathGeoProc& dfTexEffect = args.fGP.cast<GrDistanceFieldPathGeoProc>();
GrGLSLPPFragmentBuilder* fragBuilder = args.fFragBuilder;
- SkAssertResult(fragBuilder->enableFeature(
- GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
GrGLSLVertexBuilder* vertBuilder = args.fVertBuilder;
GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
@@ -610,9 +606,6 @@ public:
// add frag shader code
- SkAssertResult(fragBuilder->enableFeature(
- GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature));
-
// create LCD offset adjusted by inverse of transform
// Use highp to work around aliasing issues
fragBuilder->appendPrecisionModifier(kHigh_GrSLPrecision);