diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-09-18 14:10:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-18 18:32:13 +0000 |
commit | f7b8820dc813d1eb0b6b43fe4581dded0da38caf (patch) | |
tree | 518d313a9fa571a9f9ca26af7c381664694a4706 /tests/GrMeshTest.cpp | |
parent | 47a540f503bc722393b61c4b822e95b17f200125 (diff) |
re-land of new SkSL precisions
Bug: skia:
Change-Id: Ic1deb3db2cbda6ca45f93dee99832971a36a2119
Reviewed-on: https://skia-review.googlesource.com/47841
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'tests/GrMeshTest.cpp')
-rw-r--r-- | tests/GrMeshTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp index 0f4dcb6f6d..d174675c16 100644 --- a/tests/GrMeshTest.cpp +++ b/tests/GrMeshTest.cpp @@ -327,20 +327,20 @@ class GLSLMeshTestProcessor : public GrGLSLGeometryProcessor { GrGLSLVertexBuilder* v = args.fVertBuilder; if (!mp.fInstanceLocation) { - v->codeAppendf("float2 vertex = %s;", mp.fVertex->fName); + v->codeAppendf("highfloat2 vertex = %s;", mp.fVertex->fName); } else { if (mp.fVertex) { - v->codeAppendf("float2 offset = %s;", mp.fVertex->fName); + v->codeAppendf("highfloat2 offset = %s;", mp.fVertex->fName); } else { - v->codeAppend ("float2 offset = float2(sk_VertexID / 2, sk_VertexID % 2);"); + v->codeAppend ("highfloat2 offset = highfloat2(sk_VertexID / 2, sk_VertexID % 2);"); } - v->codeAppendf("float2 vertex = %s + offset * %i;", + v->codeAppendf("highfloat2 vertex = %s + offset * %i;", mp.fInstanceLocation->fName, kBoxSize); } - gpArgs->fPositionVar.set(kVec2f_GrSLType, "vertex"); + gpArgs->fPositionVar.set(kHighFloat2_GrSLType, "vertex"); GrGLSLPPFragmentBuilder* f = args.fFragBuilder; - f->codeAppendf("%s = float4(1);", args.fOutputCoverage); + f->codeAppendf("%s = half4(1);", args.fOutputCoverage); } }; |