aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp')
-rw-r--r--src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp b/src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp
index e06ee2db6c..4e3b6446f8 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 (kVec3f_GrSLType == posVar.getType()) {
+ if (kHighFloat3_GrSLType == posVar.getType()) {
const char* p = posVar.c_str();
- this->codeAppendf("{float2 _posTmp = float2(%s.x/%s.z, %s.y/%s.z);", p, p, p, p);
+ this->codeAppendf("{highfloat2 _posTmp = highfloat2(%s.x/%s.z, %s.y/%s.z);", p, p, p, p);
} else {
- SkASSERT(kVec2f_GrSLType == posVar.getType());
- this->codeAppendf("{float2 _posTmp = %s;", posVar.c_str());
+ SkASSERT(kHighFloat2_GrSLType == posVar.getType());
+ this->codeAppendf("{highfloat2 _posTmp = %s;", posVar.c_str());
}
- this->codeAppendf("_posTmp = floor(_posTmp) + float2(0.5, 0.5);"
- "gl_Position = float4(_posTmp.x * %s.x + %s.y,"
+ this->codeAppendf("_posTmp = floor(_posTmp) + half2(0.5, 0.5);"
+ "gl_Position = highfloat4(_posTmp.x * %s.x + %s.y,"
"_posTmp.y * %s.z + %s.w, 0, 1);}",
rtAdjustName, rtAdjustName, rtAdjustName, rtAdjustName);
- } else if (kVec3f_GrSLType == posVar.getType()) {
- this->codeAppendf("gl_Position = float4(dot(%s.xz, %s.xy), dot(%s.yz, %s.zw), 0, %s.z);",
+ } else if (kHighFloat3_GrSLType == posVar.getType()) {
+ this->codeAppendf("gl_Position = highfloat4(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(kVec2f_GrSLType == posVar.getType());
- this->codeAppendf("gl_Position = float4(%s.x * %s.x + %s.y, %s.y * %s.z + %s.w, 0, 1);",
+ SkASSERT(kHighFloat2_GrSLType == posVar.getType());
+ this->codeAppendf("gl_Position = highfloat4(%s.x * %s.x + %s.y, %s.y * %s.z + %s.w, 0, 1);",
posVar.c_str(), rtAdjustName, rtAdjustName,
posVar.c_str(), rtAdjustName, rtAdjustName);
}