Implement ANGLE_program_cache_control extensions.
This will give the browsers the ability to control the cache size,
query and populate the contents, and trim cache contents on memory
pressure.
BUG=angleproject:1897
Change-Id: I6edaa7d307b890223db98792d5b074e4a7fdfaa4
Reviewed-on: https://chromium-review.googlesource.com/563606
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/ContextState.cpp b/src/libANGLE/ContextState.cpp
index 2f00a59..032154e 100644
--- a/src/libANGLE/ContextState.cpp
+++ b/src/libANGLE/ContextState.cpp
@@ -434,6 +434,13 @@
return true;
}
+ if (getExtensions().programCacheControl && pname == GL_PROGRAM_CACHE_ENABLED_ANGLE)
+ {
+ *type = GL_BOOL;
+ *numParams = 1;
+ return true;
+ }
+
// Check for ES3.0+ parameter names which are also exposed as ES2 extensions
switch (pname)
{