fixed geometry shaders when canUseFragCoord is false

Bug: chromium:859705
Change-Id: Ia5c5b15bd5d12bf2d1c3265664bec2c3eaef24d2
Reviewed-on: https://skia-review.googlesource.com/143114
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Ethan Nicholas 2018-07-24 13:41:11 -04:00 committed by Skia Commit-Bot
parent 2587f41f26
commit 0b63196a7e

View File

@ -798,7 +798,8 @@ void GLSLCodeGenerator::writeBinaryExpression(const BinaryExpression& b,
if (precedence >= parentPrecedence) {
this->write("(");
}
bool positionWorkaround = Compiler::IsAssignment(b.fOperator) &&
bool positionWorkaround = fProgramKind == Program::Kind::kVertex_Kind &&
Compiler::IsAssignment(b.fOperator) &&
Expression::kFieldAccess_Kind == b.fLeft->fKind &&
is_sk_position((FieldAccess&) *b.fLeft) &&
!strstr(b.fRight->description().c_str(), "sk_RTAdjust") &&