diff options
author | 2016-04-11 13:02:05 -0700 | |
---|---|---|
committer | 2016-04-11 13:02:05 -0700 | |
commit | f8a6ce8d8c54cab5456d3099fa07e460c889c2e6 (patch) | |
tree | 81b9feb4858bf59708338b8952e6d473b7b2119b /src/gpu/gl/GrGLInterface.cpp | |
parent | 3f6f76f98b6b37d17d1492791ff0feb1b7586bd6 (diff) |
Add GLSL support for texelFetch
Adds a cap and builder methods for texelFetch. This is required for
texel buffers. Also moves the texel buffer cap into the general shader
caps, and adds glTexBufferRange to the GL interface.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869063005
Review URL: https://codereview.chromium.org/1869063005
Diffstat (limited to 'src/gpu/gl/GrGLInterface.cpp')
-rw-r--r-- | src/gpu/gl/GrGLInterface.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index 9cd7e68647..4e6ad08611 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -414,10 +414,16 @@ bool GrGLInterface::validate() const { RETURN_FALSE_INTERFACE; } } + if (glVer >= GR_GL_VER(4,3)) { + if (nullptr == fFunctions.fTexBufferRange) { + RETURN_FALSE_INTERFACE; + } + } } else { if (glVer >= GR_GL_VER(3,2) || fExtensions.has("GL_OES_texture_buffer") || fExtensions.has("GL_EXT_texture_buffer")) { - if (nullptr == fFunctions.fTexBuffer) { + if (nullptr == fFunctions.fTexBuffer || + nullptr == fFunctions.fTexBufferRange) { RETURN_FALSE_INTERFACE; } } |