Implement program binary caching in ES2 (with GL_OES_get_program_binary)
Change-Id: I6f9ee51f7c063ca03bf48fccd413dae244edd191
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221778
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/gl/GrGLInterfaceAutogen.cpp b/src/gpu/gl/GrGLInterfaceAutogen.cpp
index f9ec236..b861122 100644
--- a/src/gpu/gl/GrGLInterfaceAutogen.cpp
+++ b/src/gpu/gl/GrGLInterfaceAutogen.cpp
@@ -610,10 +610,19 @@
if ((GR_IS_GR_GL(fStandard) && (
(glVer >= GR_GL_VER(4,1)))) ||
(GR_IS_GR_GL_ES(fStandard) && (
- (glVer >= GR_GL_VER(3,0))))) {
+ (glVer >= GR_GL_VER(3,0)) ||
+ fExtensions.has("GL_OES_get_program_binary")))) {
if (!fFunctions.fGetProgramBinary ||
- !fFunctions.fProgramBinary ||
- !fFunctions.fProgramParameteri) {
+ !fFunctions.fProgramBinary) {
+ RETURN_FALSE_INTERFACE;
+ }
+ }
+
+ if ((GR_IS_GR_GL(fStandard) && (
+ (glVer >= GR_GL_VER(4,1)))) ||
+ (GR_IS_GR_GL_ES(fStandard) && (
+ (glVer >= GR_GL_VER(3,0))))) {
+ if (!fFunctions.fProgramParameteri) {
RETURN_FALSE_INTERFACE;
}
}