aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLInterface.cpp
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2016-04-11 13:02:05 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-11 13:02:05 -0700
commitf8a6ce8d8c54cab5456d3099fa07e460c889c2e6 (patch)
tree81b9feb4858bf59708338b8952e6d473b7b2119b /src/gpu/gl/GrGLInterface.cpp
parent3f6f76f98b6b37d17d1492791ff0feb1b7586bd6 (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.cpp8
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;
}
}