diff options
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 96a75b24d8..dfcde60d45 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -717,6 +717,22 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo) { } } + if (kGL_GrGLStandard == standard) { + glslCaps->fBufferTextureSupport = ctxInfo.version() > GR_GL_VER(3, 1) && + ctxInfo.glslGeneration() >= k330_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"; + } + } + // The Tegra3 compiler will sometimes never return if we have min(abs(x), 1.0), so we must do // the abs first in a separate expression. if (kTegra3_GrGLRenderer == ctxInfo.renderer()) { |