aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLInterface.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-11-15 12:36:29 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-15 19:37:35 +0000
commit0b63ceb10c6aef0b144b1cdee4e95b457968cd0c (patch)
treede8fe9db58f61decd0272816ef4e5c2b0d5076df /src/gpu/gl/GrGLInterface.cpp
parentd327e8c3d0ff9e9038c60f486d3f4023318e29a8 (diff)
Add image functions to GrGLInterface
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4840 Change-Id: I250cc4e637765c321c90e33c9b3f25c4ad12fe04 Reviewed-on: https://skia-review.googlesource.com/4840 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLInterface.cpp')
-rw-r--r--src/gpu/gl/GrGLInterface.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 72c2b46d41..45d84add8d 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -830,5 +830,25 @@ bool GrGLInterface::validate() const {
}
}
+ if (kGL_GrGLStandard == fStandard) {
+ if (glVer >= GR_GL_VER(4,2) || fExtensions.has("GL_ARB_shader_image_load_store")) {
+ if (nullptr == fFunctions.fBindImageTexture ||
+ nullptr == fFunctions.fMemoryBarrier) {
+ RETURN_FALSE_INTERFACE;
+ }
+ }
+ if (glVer >= GR_GL_VER(4,5) || fExtensions.has("GL_ARB_ES3_1_compatibility")) {
+ if (nullptr == fFunctions.fMemoryBarrierByRegion) {
+ RETURN_FALSE_INTERFACE;
+ }
+ }
+ } else if (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1)) {
+ if (nullptr == fFunctions.fBindImageTexture ||
+ nullptr == fFunctions.fMemoryBarrier ||
+ nullptr == fFunctions.fMemoryBarrierByRegion) {
+ RETURN_FALSE_INTERFACE;
+ }
+ }
+
return true;
}