| Index: src/gpu/gl/GrGLCaps.cpp
|
| diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
|
| index fc2c8ce39857f600298167dc7116e6d9f68c6a8e..0322a0f57cdf23812eecf9d0b162b28c96ba38f8 100644
|
| --- a/src/gpu/gl/GrGLCaps.cpp
|
| +++ b/src/gpu/gl/GrGLCaps.cpp
|
| @@ -736,18 +736,27 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) {
|
| }
|
|
|
| if (kGL_GrGLStandard == standard) {
|
| - glslCaps->fBufferTextureSupport = ctxInfo.version() > GR_GL_VER(3, 1) &&
|
| - ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
|
| + glslCaps->fTexelFetchSupport = ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
|
| } else {
|
| - if (ctxInfo.version() > GR_GL_VER(3, 2) &&
|
| - ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) {
|
| - glslCaps->fBufferTextureSupport = true;
|
| - } else if (ctxInfo.hasExtension("GL_OES_texture_buffer")) {
|
| - glslCaps->fBufferTextureSupport = true;
|
| - glslCaps->fBufferTextureExtensionString = "GL_OES_texture_buffer";
|
| - } else if (ctxInfo.hasExtension("GL_EXT_texture_buffer")) {
|
| - glslCaps->fBufferTextureSupport = true;
|
| - glslCaps->fBufferTextureExtensionString = "GL_EXT_texture_buffer";
|
| + glslCaps->fTexelFetchSupport =
|
| + ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // We use this value for GLSL ES 3.0.
|
| + }
|
| +
|
| + if (glslCaps->fTexelFetchSupport) {
|
| + if (kGL_GrGLStandard == standard) {
|
| + glslCaps->fTexelBufferSupport = ctxInfo.version() >= GR_GL_VER(4, 3) &&
|
| + ctxInfo.glslGeneration() >= k330_GrGLSLGeneration;
|
| + } else {
|
| + if (ctxInfo.version() >= GR_GL_VER(3, 2) &&
|
| + ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) {
|
| + glslCaps->fTexelBufferSupport = true;
|
| + } else if (ctxInfo.hasExtension("GL_OES_texture_buffer")) {
|
| + glslCaps->fTexelBufferSupport = true;
|
| + glslCaps->fTexelBufferExtensionString = "GL_OES_texture_buffer";
|
| + } else if (ctxInfo.hasExtension("GL_EXT_texture_buffer")) {
|
| + glslCaps->fTexelBufferSupport = true;
|
| + glslCaps->fTexelBufferExtensionString = "GL_EXT_texture_buffer";
|
| + }
|
| }
|
| }
|
|
|
|
|