| Index: src/gpu/gl/builders/GrGLShaderBuilder.cpp
|
| diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.cpp b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
|
| index 984233dd77f0bb74f72083734594d05a16ec8585..67fbe2451dc4c148977c2a1ce10df4675c384f78 100644
|
| --- a/src/gpu/gl/builders/GrGLShaderBuilder.cpp
|
| +++ b/src/gpu/gl/builders/GrGLShaderBuilder.cpp
|
| @@ -12,6 +12,14 @@
|
| #include "../GrGLShaderVar.h"
|
|
|
| namespace {
|
| +inline const char* sample_function_name(GrSLType type, GrGLSLGeneration glslGen) {
|
| + if (kVec2f_GrSLType == type) {
|
| + return glslGen >= k130_GrGLSLGeneration ? "texture" : "texture2D";
|
| + } else {
|
| + SkASSERT(kVec3f_GrSLType == type);
|
| + return glslGen >= k130_GrGLSLGeneration ? "textureProj" : "texture2DProj";
|
| + }
|
| +}
|
| void append_texture_lookup(SkString* out,
|
| GrGLGpu* gpu,
|
| const char* samplerName,
|
| @@ -22,7 +30,7 @@
|
| SkASSERT(coordName);
|
|
|
| out->appendf("%s(%s, %s)",
|
| - GrGLSLTexture2DFunctionName(varyingType, gpu->glslGeneration()),
|
| + sample_function_name(varyingType, gpu->glslGeneration()),
|
| samplerName,
|
| coordName);
|
|
|
|
|