diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-12-12 09:48:48 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-12 15:24:09 +0000 |
commit | e7e81c15c144b8133f696d0744ed9f7e8d06e936 (patch) | |
tree | a8b97c5e3ee2dea146a9cedbff3a33356a181180 /src/gpu/glsl/GrGLSLUniformHandler.h | |
parent | 344e9037e1befdee76691a1239a47829e6af4ea5 (diff) |
converted vertex shaders to device coords
Bug: skia:6239
Change-Id: I1a3b67fe84d208d426d71deb7aea6b0cd433af37
Reviewed-on: https://skia-review.googlesource.com/75501
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/glsl/GrGLSLUniformHandler.h')
-rw-r--r-- | src/gpu/glsl/GrGLSLUniformHandler.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gpu/glsl/GrGLSLUniformHandler.h b/src/gpu/glsl/GrGLSLUniformHandler.h index e1511c2578..662486eebe 100644 --- a/src/gpu/glsl/GrGLSLUniformHandler.h +++ b/src/gpu/glsl/GrGLSLUniformHandler.h @@ -12,6 +12,9 @@ #include "GrShaderVar.h" #include "GrSwizzle.h" +// variable names beginning with this prefix will not be mangled +#define GR_NO_MANGLE_PREFIX "sk_" + class GrGLSLProgramBuilder; class GrGLSLUniformHandler { @@ -51,7 +54,8 @@ public: int arrayCount, const char** outName = nullptr) { SkASSERT(!GrSLTypeIsCombinedSamplerType(type)); - return this->internalAddUniformArray(visibility, type, precision, name, true, arrayCount, + bool mangle = strncmp(name, GR_NO_MANGLE_PREFIX, strlen(GR_NO_MANGLE_PREFIX)); + return this->internalAddUniformArray(visibility, type, precision, name, mangle, arrayCount, outName); } @@ -61,7 +65,8 @@ public: int arrayCount, const char** outName = nullptr) { SkASSERT(!GrSLTypeIsCombinedSamplerType(type)); - return this->internalAddUniformArray(visibility, type, kDefault_GrSLPrecision, name, true, + bool mangle = strncmp(name, GR_NO_MANGLE_PREFIX, strlen(GR_NO_MANGLE_PREFIX)); + return this->internalAddUniformArray(visibility, type, kDefault_GrSLPrecision, name, mangle, arrayCount, outName); } |