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 /src/sksl/SkSLHCodeGenerator.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 'src/sksl/SkSLHCodeGenerator.cpp')
-rw-r--r-- | src/sksl/SkSLHCodeGenerator.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/sksl/SkSLHCodeGenerator.cpp b/src/sksl/SkSLHCodeGenerator.cpp index 482020af7f..8203990df2 100644 --- a/src/sksl/SkSLHCodeGenerator.cpp +++ b/src/sksl/SkSLHCodeGenerator.cpp @@ -23,13 +23,15 @@ HCodeGenerator::HCodeGenerator(const Program* program, ErrorReporter* errors, St , fSectionAndParameterHelper(*program, *errors) {} String HCodeGenerator::ParameterType(const Type& type) { - if (type.name() == "float2") { + if (type.name() == "highfloat" || type.name() == "half") { + return "float"; + } else if (type.name() == "highfloat2" || type.name() == "half2") { return "SkPoint"; - } else if (type.name() == "int4") { + } else if (type.name() == "int4" || type.name() == "short4") { return "SkIRect"; - } else if (type.name() == "float4") { + } else if (type.name() == "highfloat4" || type.name() == "half4") { return "SkRect"; - } else if (type.name() == "float4x4") { + } else if (type.name() == "highfloat4x4" || type.name() == "half4x4") { return "SkMatrix44"; } else if (type.kind() == Type::kSampler_Kind) { return "sk_sp<GrTextureProxy>"; |