aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/GLVertexAttributesBench.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-09-15 11:42:17 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-15 18:50:54 +0000
commit05d5a13fea6246648de7e41358ed338d53c85ea2 (patch)
tree695fdbeae1116f8ce813288e47b31c2a99f28f1f /bench/GLVertexAttributesBench.cpp
parent49f1f34438d3431f6d7e32847accd2ba96948a73 (diff)
Revert "Revert "Switched highp float to highfloat and mediump float to half.""
This reverts commit 1d816b92bb7cf2258007f3f74ffd143b89f25d01. Bug: skia: Change-Id: I388b5e5e9bf619db48297a80c9a80c039f26c9f1 Reviewed-on: https://skia-review.googlesource.com/46464 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'bench/GLVertexAttributesBench.cpp')
-rw-r--r--bench/GLVertexAttributesBench.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/bench/GLVertexAttributesBench.cpp b/bench/GLVertexAttributesBench.cpp
index 3980a0be0c..f10bd11392 100644
--- a/bench/GLVertexAttributesBench.cpp
+++ b/bench/GLVertexAttributesBench.cpp
@@ -69,7 +69,7 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
const char* version = shaderCaps->versionDeclString();
// setup vertex shader
- GrShaderVar aPosition("a_position", kVec4f_GrSLType, GrShaderVar::kIn_TypeModifier);
+ GrShaderVar aPosition("a_position", kHighFloat4_GrSLType, GrShaderVar::kIn_TypeModifier);
SkTArray<GrShaderVar> aVars;
SkTArray<GrShaderVar> oVars;
@@ -81,7 +81,7 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
SkString aname;
aname.appendf("a_color_%d", i);
aVars.push_back(GrShaderVar(aname.c_str(),
- kVec4f_GrSLType,
+ kHalf4_GrSLType,
GrShaderVar::kIn_TypeModifier));
aVars.back().appendDecl(shaderCaps, &vshaderTxt);
vshaderTxt.append(";\n");
@@ -92,7 +92,7 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
SkString oname;
oname.appendf("o_color_%d", i);
oVars.push_back(GrShaderVar(oname.c_str(),
- kVec4f_GrSLType,
+ kHalf4_GrSLType,
GrShaderVar::kOut_TypeModifier));
oVars.back().appendDecl(shaderCaps, &vshaderTxt);
vshaderTxt.append(";\n");
@@ -109,15 +109,14 @@ GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a
// Passthrough position as a dummy
for (uint32_t i = attribs; i < maxAttribs; i++) {
- vshaderTxt.appendf("%s = float4(0, 0, 0, 1);\n", oVars[i].c_str());
+ vshaderTxt.appendf("%s = highfloat4(0, 0, 0, 1);\n", oVars[i].c_str());
}
vshaderTxt.append("}\n");
// setup fragment shader
- GrShaderVar oFragColor("o_FragColor", kVec4f_GrSLType, GrShaderVar::kOut_TypeModifier);
+ GrShaderVar oFragColor("o_FragColor", kHalf4_GrSLType, GrShaderVar::kOut_TypeModifier);
SkString fshaderTxt(version);
- GrGLSLAppendDefaultFloatPrecisionDeclaration(kMedium_GrSLPrecision, *shaderCaps, &fshaderTxt);
const char* fsOutName;
if (shaderCaps->mustDeclareFragmentShaderOutput()) {