From 0b63196a7eed40388a4b7b68990b45503554b290 Mon Sep 17 00:00:00 2001 From: Ethan Nicholas Date: Tue, 24 Jul 2018 13:41:11 -0400 Subject: [PATCH] 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 Reviewed-by: Brian Salomon --- src/sksl/SkSLGLSLCodeGenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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") &&