| Index: src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
|
| diff --git a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
|
| index cde827939219dd9e3c7a1a7adef3f69009bf4e53..fc92da713af214e481f359d5ae28d8f8b0fd3cf5 100644
|
| --- a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
|
| +++ b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
|
| @@ -58,12 +58,14 @@ void GrGLVertexBuilder::transformToNormalizedDeviceSpace(const GrShaderVar& posV
|
| this->codeAppendf("{vec2 _posTmp = %s;", posVar.c_str());
|
| }
|
| this->codeAppendf("_posTmp = floor(_posTmp) + vec2(0.5, 0.5);"
|
| - "gl_Position = vec4(_posTmp.x * %s.x + %s.y, _posTmp.y * %s.z + %s.w, 0, 1);}",
|
| + "gl_Position = vec4(_posTmp.x * %s.x + %s.y,"
|
| + "_posTmp.y * %s.z + %s.w, 0, 1);}",
|
| fRtAdjustName, fRtAdjustName, fRtAdjustName, fRtAdjustName);
|
| } else if (kVec3f_GrSLType == posVar.getType()) {
|
| - this->codeAppendf("gl_Position = vec4(dot(%s.xz, %s.xy)/%s.z, dot(%s.yz, %s.zw)/%s.z, 0, 1);",
|
| - posVar.c_str(), fRtAdjustName, posVar.c_str(),
|
| - posVar.c_str(), fRtAdjustName, posVar.c_str());
|
| + this->codeAppendf("gl_Position = vec4(dot(%s.xz, %s.xy), dot(%s.yz, %s.zw), 0, %s.z);",
|
| + posVar.c_str(), fRtAdjustName,
|
| + posVar.c_str(), fRtAdjustName,
|
| + posVar.c_str());
|
| } else {
|
| SkASSERT(kVec2f_GrSLType == posVar.getType());
|
| this->codeAppendf("gl_Position = vec4(%s.x * %s.x + %s.y, %s.y * %s.z + %s.w, 0, 1);",
|
|
|