Invalidate completeness caches when enabling extensions.
Enabling extensions can cause framebuffers and textures to go from
incomplete to complete.
No functional changes from the API surface.
BUG=angleproject:1523
BUG=angleproject:1958
Change-Id: Iff686e1c292f6cf4921d6fffd7eb98bedaba828b
Reviewed-on: https://chromium-review.googlesource.com/468410
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index a8a5ade..85d7f00 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -2511,6 +2511,16 @@
// Re-create the compiler with the requested extensions enabled.
SafeDelete(mCompiler);
mCompiler = new Compiler(mImplementation.get(), mState);
+
+ // Invalidate all cached completenesses for textures and framebuffer. Some extensions make new
+ // formats renderable or sampleable.
+ mState.mTextures->invalidateTextureComplenessCache();
+ for (auto &zeroTexture : mZeroTextures)
+ {
+ zeroTexture.second->invalidateCompletenessCache();
+ }
+
+ mState.mFramebuffers->invalidateFramebufferComplenessCache();
}
size_t Context::getRequestableExtensionStringCount() const