Skip to content

Commit

Permalink
Fix for dashing shader on Mali: use highp where necessary.
Browse files Browse the repository at this point in the history
The varyings used to compute rect coverage need to be high precision,
since they're offset by the frag coord.

R=egdaniel

BUG=skia:3935

Review URL: https://codereview.chromium.org/1178123004
  • Loading branch information
SenorBlanco authored and Commit bot committed Jun 11, 2015
1 parent 78d79cc commit 1422ec8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gpu/effects/GrDashingEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1079,13 +1079,13 @@ void GLDashingLineEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {

// XY refers to dashPos, Z is the dash interval length
GrGLVertToFrag inDashParams(kVec3f_GrSLType);
args.fPB->addVarying("DashParams", &inDashParams);
args.fPB->addVarying("DashParams", &inDashParams, GrSLPrecision::kHigh_GrSLPrecision);
vsBuilder->codeAppendf("%s = %s;", inDashParams.vsOut(), de.inDashParams()->fName);

// The rect uniform's xyzw refer to (left + 0.5, top + 0.5, right - 0.5, bottom - 0.5),
// respectively.
GrGLVertToFrag inRectParams(kVec4f_GrSLType);
args.fPB->addVarying("RectParams", &inRectParams);
args.fPB->addVarying("RectParams", &inRectParams, GrSLPrecision::kHigh_GrSLPrecision);
vsBuilder->codeAppendf("%s = %s;", inRectParams.vsOut(), de.inRectParams()->fName);

// Setup pass through color
Expand Down

0 comments on commit 1422ec8

Please sign in to comment.