renamed SkSL types in preparation for killing precision modifiers
Bug: skia:
Change-Id: Iff0289e25355a89cdc289a0892ed755dd1b1c900
Reviewed-on: https://skia-review.googlesource.com/27703
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
index 9dd1cba..3ab5b68 100644
--- a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
@@ -62,9 +62,9 @@
handler->specifyCoordsForCurrCoordTransform(SkString(v.fsIn()), varyingType);
if (kVec2f_GrSLType == varyingType) {
- vb->codeAppendf("%s = (%s * vec3(%s, 1)).xy;", v.vsOut(), uniName, localCoords);
+ vb->codeAppendf("%s = (%s * float3(%s, 1)).xy;", v.vsOut(), uniName, localCoords);
} else {
- vb->codeAppendf("%s = %s * vec3(%s, 1);", v.vsOut(), uniName, localCoords);
+ vb->codeAppendf("%s = %s * float3(%s, 1);", v.vsOut(), uniName, localCoords);
}
++i;
}
@@ -89,7 +89,7 @@
GrGPArgs* gpArgs,
const char* posName) {
gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2");
- vertBuilder->codeAppendf("vec2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
+ vertBuilder->codeAppendf("float2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
}
void GrGLSLGeometryProcessor::setupPosition(GrGLSLVertexBuilder* vertBuilder,
@@ -100,7 +100,7 @@
UniformHandle* viewMatrixUniform) {
if (mat.isIdentity()) {
gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2");
- vertBuilder->codeAppendf("vec2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
+ vertBuilder->codeAppendf("float2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
} else {
const char* viewMatrixName;
*viewMatrixUniform = uniformHandler->addUniform(kVertex_GrShaderFlag,
@@ -109,11 +109,11 @@
&viewMatrixName);
if (!mat.hasPerspective()) {
gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2");
- vertBuilder->codeAppendf("vec2 %s = (%s * vec3(%s, 1)).xy;",
+ vertBuilder->codeAppendf("float2 %s = (%s * float3(%s, 1)).xy;",
gpArgs->fPositionVar.c_str(), viewMatrixName, posName);
} else {
gpArgs->fPositionVar.set(kVec3f_GrSLType, "pos3");
- vertBuilder->codeAppendf("vec3 %s = %s * vec3(%s, 1);",
+ vertBuilder->codeAppendf("float3 %s = %s * float3(%s, 1);",
gpArgs->fPositionVar.c_str(), viewMatrixName, posName);
}
}