switched SkSL's temporary 'highfloat' type back to 'float'
Bug: skia:
Change-Id: If0debae7318b6b5b4a7cb85d458996a09931127e
Reviewed-on: https://skia-review.googlesource.com/48760
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 072d62c..8effbc7 100644
--- a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
@@ -18,7 +18,7 @@
GrGPArgs gpArgs;
this->onEmitCode(args, &gpArgs);
vBuilder->transformToNormalizedDeviceSpace(gpArgs.fPositionVar, args.fRTAdjustName);
- if (kHighFloat2_GrSLType == gpArgs.fPositionVar.getType() ||
+ if (kFloat2_GrSLType == gpArgs.fPositionVar.getType() ||
kHalf2_GrSLType == gpArgs.fPositionVar.getType()) {
args.fVaryingHandler->setNoPerspective();
}
@@ -40,13 +40,13 @@
uint32_t type = coordTransform->getMatrix().getType();
type |= localMatrix.getType();
- varyingType = SkToBool(SkMatrix::kPerspective_Mask & type) ? kHighFloat3_GrSLType :
- kHighFloat2_GrSLType;
+ varyingType = SkToBool(SkMatrix::kPerspective_Mask & type) ? kFloat3_GrSLType :
+ kFloat2_GrSLType;
const char* uniName;
fInstalledTransforms.push_back().fHandle = uniformHandler->addUniform(kVertex_GrShaderFlag,
- kHighFloat3x3_GrSLType,
+ kFloat3x3_GrSLType,
strUniName.c_str(),
&uniName).toIndex();
SkString strVaryingName;
@@ -55,13 +55,13 @@
GrGLSLVertToFrag v(varyingType);
varyingHandler->addVarying(strVaryingName.c_str(), &v, kHigh_GrSLPrecision);
- SkASSERT(kHighFloat2_GrSLType == varyingType || kHighFloat3_GrSLType == varyingType);
+ SkASSERT(kFloat2_GrSLType == varyingType || kFloat3_GrSLType == varyingType);
handler->specifyCoordsForCurrCoordTransform(SkString(v.fsIn()), varyingType);
- if (kHighFloat2_GrSLType == varyingType) {
- vb->codeAppendf("%s = (%s * highfloat3(%s, 1)).xy;", v.vsOut(), uniName, localCoords);
+ if (kFloat2_GrSLType == varyingType) {
+ vb->codeAppendf("%s = (%s * float3(%s, 1)).xy;", v.vsOut(), uniName, localCoords);
} else {
- vb->codeAppendf("%s = %s * highfloat3(%s, 1);", v.vsOut(), uniName, localCoords);
+ vb->codeAppendf("%s = %s * float3(%s, 1);", v.vsOut(), uniName, localCoords);
}
++i;
}
@@ -85,8 +85,8 @@
void GrGLSLGeometryProcessor::writeOutputPosition(GrGLSLVertexBuilder* vertBuilder,
GrGPArgs* gpArgs,
const char* posName) {
- gpArgs->fPositionVar.set(kHighFloat2_GrSLType, "pos2");
- vertBuilder->codeAppendf("highfloat2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
+ gpArgs->fPositionVar.set(kFloat2_GrSLType, "pos2");
+ vertBuilder->codeAppendf("float2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
}
void GrGLSLGeometryProcessor::writeOutputPosition(GrGLSLVertexBuilder* vertBuilder,
@@ -96,21 +96,21 @@
const SkMatrix& mat,
UniformHandle* viewMatrixUniform) {
if (mat.isIdentity()) {
- gpArgs->fPositionVar.set(kHighFloat2_GrSLType, "pos2");
- vertBuilder->codeAppendf("highfloat2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
+ gpArgs->fPositionVar.set(kFloat2_GrSLType, "pos2");
+ vertBuilder->codeAppendf("float2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
} else {
const char* viewMatrixName;
*viewMatrixUniform = uniformHandler->addUniform(kVertex_GrShaderFlag,
- kHighFloat3x3_GrSLType,
+ kFloat3x3_GrSLType,
"uViewM",
&viewMatrixName);
if (!mat.hasPerspective()) {
- gpArgs->fPositionVar.set(kHighFloat2_GrSLType, "pos2");
- vertBuilder->codeAppendf("highfloat2 %s = (%s * highfloat3(%s, 1)).xy;",
+ gpArgs->fPositionVar.set(kFloat2_GrSLType, "pos2");
+ vertBuilder->codeAppendf("float2 %s = (%s * float3(%s, 1)).xy;",
gpArgs->fPositionVar.c_str(), viewMatrixName, posName);
} else {
- gpArgs->fPositionVar.set(kHighFloat3_GrSLType, "pos3");
- vertBuilder->codeAppendf("highfloat3 %s = %s * highfloat3(%s, 1);",
+ gpArgs->fPositionVar.set(kFloat3_GrSLType, "pos3");
+ vertBuilder->codeAppendf("float3 %s = %s * float3(%s, 1);",
gpArgs->fPositionVar.c_str(), viewMatrixName, posName);
}
}