diff options
Diffstat (limited to 'src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp')
-rw-r--r-- | src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp b/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp index e540494064..192417cc53 100644 --- a/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp +++ b/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp @@ -26,24 +26,24 @@ void GrGLSLVertexBuilder::transformToNormalizedDeviceSpace(const GrShaderVar& po this->codeAppendf("{float2 _posTmp = %s;", posVar.c_str()); } this->codeAppendf("_posTmp = floor(_posTmp) + half2(0.5, 0.5);" - "gl_Position = float4(_posTmp.x * %s.x + %s.y," + "sk_Position = float4(_posTmp.x * %s.x + %s.y," "_posTmp.y * %s.z + %s.w, 0, 1);}", rtAdjustName, rtAdjustName, rtAdjustName, rtAdjustName); } else if (kFloat3_GrSLType == posVar.getType()) { - this->codeAppendf("gl_Position = float4(dot(%s.xz, %s.xy), dot(%s.yz, %s.zw), 0, %s.z);", + this->codeAppendf("sk_Position = float4(dot(%s.xz, %s.xy), dot(%s.yz, %s.zw), 0, %s.z);", posVar.c_str(), rtAdjustName, posVar.c_str(), rtAdjustName, posVar.c_str()); } else { SkASSERT(kFloat2_GrSLType == posVar.getType()); - this->codeAppendf("gl_Position = float4(%s.x * %s.x + %s.y, %s.y * %s.z + %s.w, 0, 1);", + this->codeAppendf("sk_Position = float4(%s.x * %s.x + %s.y, %s.y * %s.z + %s.w, 0, 1);", posVar.c_str(), rtAdjustName, rtAdjustName, posVar.c_str(), rtAdjustName, rtAdjustName); } // We could have the GrGeometryProcessor do this, but its just easier to have it performed // here. If we ever need to set variable pointsize, then we can reinvestigate. if (this->getProgramBuilder()->desc()->header().fHasPointSize) { - this->codeAppend("gl_PointSize = 1.0;"); + this->codeAppend("sk_PointSize = 1.0;"); } } |