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

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

Issue 1784063003: Add caps and GL API for buffer texture (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_precision
Patch Set: Created 4 years, 9 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/GrGLDefines.h ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | 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 84c51fb2524cc08a7ca85bee3a7f131265f95b77..728fb3f9e5f29e8d91e0a385eb328636d709454d 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -424,6 +424,21 @@ bool GrGLInterface::validate() const {
}
if (kGL_GrGLStandard == fStandard) {
+ if (glVer >= GR_GL_VER(3,1)) {
+ if (nullptr == fFunctions.fTexBuffer) {
+ 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) {
+ RETURN_FALSE_INTERFACE;
+ }
+ }
+ }
+
+ if (kGL_GrGLStandard == fStandard) {
if (glVer >= GR_GL_VER(3, 0) || fExtensions.has("GL_ARB_vertex_array_object")) {
if (nullptr == fFunctions.fBindVertexArray ||
nullptr == fFunctions.fDeleteVertexArrays ||
@@ -746,6 +761,11 @@ bool GrGLInterface::validate() const {
RETURN_FALSE_INTERFACE
}
}
+ if (glVer >= GR_GL_VER(3,1)) {
+ if (nullptr == fFunctions.fTextureBuffer) {
+ RETURN_FALSE_INTERFACE;
+ }
+ }
}
if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) ||
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698