| Index: src/gpu/glsl/GrGLSL.h
|
| diff --git a/src/gpu/glsl/GrGLSL.h b/src/gpu/glsl/GrGLSL.h
|
| index 12c1f1fcc6b375e35a677757f28adf76d0a4662a..8ae6219d874ad220d7b3c686690d7abe76547b21 100644
|
| --- a/src/gpu/glsl/GrGLSL.h
|
| +++ b/src/gpu/glsl/GrGLSL.h
|
| @@ -56,9 +56,13 @@ bool GrGLSLSupportsNamedFragmentShaderOutputs(GrGLSLGeneration);
|
| * Gets the name of the function that should be used to sample a 2D texture. Coord type is used
|
| * to indicate whether the texture is sampled using projective textured (kVec3f) or not (kVec2f).
|
| */
|
| -inline const char* GrGLSLTexture2DFunctionName(GrSLType coordType, GrSLType samplerType,
|
| - GrGLSLGeneration glslGen) {
|
| +inline const char* GrGLSLTextureFunctionName(GrSLType coordType, GrSLType samplerType,
|
| + GrGLSLGeneration glslGen) {
|
| SkASSERT(GrSLTypeIsSamplerType(samplerType));
|
| + if (kSamplerBuffer_GrSLType == samplerType) {
|
| + SkASSERT(kInt_GrSLType == coordType);
|
| + return "texelFetch";
|
| + }
|
| SkASSERT(kVec2f_GrSLType == coordType || kVec3f_GrSLType == coordType);
|
| // GL_TEXTURE_RECTANGLE_ARB is written against OpenGL 2.0/GLSL 1.10. At that time there were
|
| // separate texture*() functions. In OpenGL 3.0/GLSL 1.30 the different texture*() functions
|
| @@ -110,6 +114,8 @@ static inline const char* GrGLSLTypeString(GrSLType t) {
|
| return "samplerExternalOES";
|
| case kSampler2DRect_GrSLType:
|
| return "sampler2DRect";
|
| + case kSamplerBuffer_GrSLType:
|
| + return "samplerBuffer";
|
| case kBool_GrSLType:
|
| return "bool";
|
| case kInt_GrSLType:
|
|
|