aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sksl/SkSLGLSLCodeGenerator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index 76e76c3271..8766260940 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -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") &&