Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: src/gpu/gl/GrGLInterface.cpp

Issue 1090163002: Import glTextureBarrier (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLInterface.cpp
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 2e3dd1f039b5bb178eb420680bb2bf6da9610327..da1c3fc0e13b2d57207ea4f813248a2eb9d4978c 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -306,6 +306,21 @@ bool GrGLInterface::validate() const {
}
}
+ // glTextureBarrier is part of desktop 4.5. There are also ARB and NV extensions.
+ if (kGL_GrGLStandard == fStandard) {
+ if (glVer >= GR_GL_VER(4,5) ||
+ fExtensions.has("GL_ARB_texture_barrier") ||
+ fExtensions.has("GL_NV_texture_barrier")) {
+ if (NULL == fFunctions.fTextureBarrier) {
+ RETURN_FALSE_INTERFACE
+ }
+ }
+ } else if (fExtensions.has("GL_NV_texture_barrier")) {
+ if (NULL == fFunctions.fTextureBarrier) {
+ RETURN_FALSE_INTERFACE
+ }
+ }
+
if (fExtensions.has("GL_EXT_discard_framebuffer")) {
// FIXME: Remove this once Chromium is updated to provide this function
#if 0
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698