diff options
Diffstat (limited to 'src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp')
-rw-r--r-- | src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp b/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp index 4e3b6446f8..e540494064 100644 --- a/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp +++ b/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp @@ -18,25 +18,25 @@ void GrGLSLVertexBuilder::transformToNormalizedDeviceSpace(const GrShaderVar& po const char* rtAdjustName) { // setup RT Uniform if (this->getProgramBuilder()->desc()->header().fSnapVerticesToPixelCenters) { - if (kHighFloat3_GrSLType == posVar.getType()) { + if (kFloat3_GrSLType == posVar.getType()) { const char* p = posVar.c_str(); - this->codeAppendf("{highfloat2 _posTmp = highfloat2(%s.x/%s.z, %s.y/%s.z);", p, p, p, p); + this->codeAppendf("{float2 _posTmp = float2(%s.x/%s.z, %s.y/%s.z);", p, p, p, p); } else { - SkASSERT(kHighFloat2_GrSLType == posVar.getType()); - this->codeAppendf("{highfloat2 _posTmp = %s;", posVar.c_str()); + SkASSERT(kFloat2_GrSLType == posVar.getType()); + this->codeAppendf("{float2 _posTmp = %s;", posVar.c_str()); } this->codeAppendf("_posTmp = floor(_posTmp) + half2(0.5, 0.5);" - "gl_Position = highfloat4(_posTmp.x * %s.x + %s.y," + "gl_Position = float4(_posTmp.x * %s.x + %s.y," "_posTmp.y * %s.z + %s.w, 0, 1);}", rtAdjustName, rtAdjustName, rtAdjustName, rtAdjustName); - } else if (kHighFloat3_GrSLType == posVar.getType()) { - this->codeAppendf("gl_Position = highfloat4(dot(%s.xz, %s.xy), dot(%s.yz, %s.zw), 0, %s.z);", + } else if (kFloat3_GrSLType == posVar.getType()) { + this->codeAppendf("gl_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(kHighFloat2_GrSLType == posVar.getType()); - this->codeAppendf("gl_Position = highfloat4(%s.x * %s.x + %s.y, %s.y * %s.z + %s.w, 0, 1);", + SkASSERT(kFloat2_GrSLType == posVar.getType()); + this->codeAppendf("gl_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); } |