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

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

Issue 1666803002: Add GL indirect drawing APIs (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_rastermultisample
Patch Set: formatting Created 4 years, 10 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') | 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 b8d7db6b2e513bcfe3c16b778cef36601954893a..925f081b342bb733001829bc9edb51719292de5b 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -579,6 +579,22 @@ bool GrGLInterface::validate() const {
}
}
+ if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) ||
+ (kGLES_GrGLStandard == fStandard && glVer >= GR_GL_VER(3,1))) {
+ if (NULL == fFunctions.fDrawArraysIndirect ||
+ NULL == fFunctions.fDrawElementsIndirect) {
+ RETURN_FALSE_INTERFACE
+ }
+ }
+
+ if ((kGL_GrGLStandard == fStandard && glVer >= GR_GL_VER(4,3)) ||
+ (kGLES_GrGLStandard == fStandard && fExtensions.has("GL_EXT_multi_draw_indirect"))) {
+ if (NULL == fFunctions.fMultiDrawArraysIndirect ||
+ NULL == fFunctions.fMultiDrawElementsIndirect) {
+ RETURN_FALSE_INTERFACE
+ }
+ }
+
if (fExtensions.has("GL_NV_bindless_texture")) {
if (nullptr == fFunctions.fGetTextureHandle ||
nullptr == fFunctions.fGetTextureSamplerHandle ||
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698