Commit 2d170801 authored by Geoff Lang's avatar Geoff Lang Committed by Commit Bot

Expose GL_CHROMIUM_compressed_texture_etc when ANGLE supports it.

ANGLE now exposes this extension under the same conditions as Chrome: on top
of a native ES driver.

BUG=angleproject:1552

Change-Id: I6552e51bccd5ece43b7405b26d63127283a90c46
Reviewed-on: https://chromium-review.googlesource.com/c/1342497Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarKai Ninomiya <kainino@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609713}
parent ce1a297b
...@@ -1029,10 +1029,11 @@ void FeatureInfo::InitializeFeatures() { ...@@ -1029,10 +1029,11 @@ void FeatureInfo::InitializeFeatures() {
validators_.texture_internal_format_storage.AddValue(GL_ETC1_RGB8_OES); validators_.texture_internal_format_storage.AddValue(GL_ETC1_RGB8_OES);
} }
// TODO(kainino): Once we have a way to query whether ANGLE is exposing // Expose GL_CHROMIUM_compressed_texture_etc when ANGLE exposes it directly or
// native support for ETC2 textures, require that here. // running on top of a non-ANGLE ES driver. We assume that this implies native
// http://anglebug.com/1552 // support of these formats.
if (gl_version_info_->is_es3 && !gl_version_info_->is_angle) { if (gfx::HasExtension(extensions, "GL_CHROMIUM_compressed_texture_etc") ||
(gl_version_info_->is_es3 && !gl_version_info_->is_angle)) {
AddExtensionString("GL_CHROMIUM_compressed_texture_etc"); AddExtensionString("GL_CHROMIUM_compressed_texture_etc");
validators_.UpdateETCCompressedTextureFormats(); validators_.UpdateETCCompressedTextureFormats();
} }
......
...@@ -11,6 +11,8 @@ namespace blink { ...@@ -11,6 +11,8 @@ namespace blink {
WebGLCompressedTextureETC::WebGLCompressedTextureETC( WebGLCompressedTextureETC::WebGLCompressedTextureETC(
WebGLRenderingContextBase* context) WebGLRenderingContextBase* context)
: WebGLExtension(context) { : WebGLExtension(context) {
context->ExtensionsUtil()->EnsureExtensionEnabled(
"GL_CHROMIUM_compressed_texture_etc");
context->AddCompressedTextureFormat(GL_COMPRESSED_R11_EAC); context->AddCompressedTextureFormat(GL_COMPRESSED_R11_EAC);
context->AddCompressedTextureFormat(GL_COMPRESSED_SIGNED_R11_EAC); context->AddCompressedTextureFormat(GL_COMPRESSED_SIGNED_R11_EAC);
context->AddCompressedTextureFormat(GL_COMPRESSED_RGB8_ETC2); context->AddCompressedTextureFormat(GL_COMPRESSED_RGB8_ETC2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment