Support ETC2 texture formats with RendererGL.
400 tests in dEQP-GLES3.functional.texture go from unsupported to passing.
BUG=angleproject:884
Change-Id: I51927dffbc5931c7d1b80e72f55c620197736724
Reviewed-on: https://chromium-review.googlesource.com/298484
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index e5ab8a2..4337b83 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -1716,10 +1716,15 @@
const InternalFormat &formatInfo = GetInternalFormatInfo(format);
- // Update the format caps based on the client version and extensions
- formatCaps.texturable = formatInfo.textureSupport(clientVersion, mExtensions);
- formatCaps.renderable = formatInfo.renderSupport(clientVersion, mExtensions);
- formatCaps.filterable = formatInfo.filterSupport(clientVersion, mExtensions);
+ // Update the format caps based on the client version and extensions.
+ // Caps are AND'd with the renderer caps because some core formats are still unsupported in
+ // ES3.
+ formatCaps.texturable =
+ formatCaps.texturable && formatInfo.textureSupport(clientVersion, mExtensions);
+ formatCaps.renderable =
+ formatCaps.renderable && formatInfo.renderSupport(clientVersion, mExtensions);
+ formatCaps.filterable =
+ formatCaps.filterable && formatInfo.filterSupport(clientVersion, mExtensions);
// OpenGL ES does not support multisampling with integer formats
if (!formatInfo.renderSupport || formatInfo.componentType == GL_INT || formatInfo.componentType == GL_UNSIGNED_INT)