Index: src/gpu/gl/GrGLShaderBuilder.cpp |
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp |
index 264bc3b0050eb8675b310c9ad2f040246475daf6..94568e034ad3d6350449012bc58bca54045e946d 100644 |
--- a/src/gpu/gl/GrGLShaderBuilder.cpp |
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp |
@@ -404,14 +404,11 @@ const char* GrGLShaderBuilder::fragmentPosition() { |
return ""; |
} |
} |
+ // We only declare "gl_FragCoord" when we're in the case where we want to use layout qualifiers |
+ // to reverse y. Otherwise it isn't necessary and whether the "in" qualifier appears in the |
+ // declaration varies in earlier GLSL specs. So it is simpler to omit it. |
if (fTopLeftFragPosRead) { |
- if (!fSetupFragPosition) { |
- fFSInputs.push_back().set(kVec4f_GrSLType, |
- GrGLShaderVar::kIn_TypeModifier, |
- "gl_FragCoord", |
- GrGLShaderVar::kDefault_Precision); |
- fSetupFragPosition = true; |
- } |
+ fSetupFragPosition = true; |
return "gl_FragCoord"; |
} else if (fGpu->glCaps().fragCoordConventionsSupport()) { |
if (!fSetupFragPosition) { |