Commit 8421d5b4 authored by Geoff Lang's avatar Geoff Lang Committed by Commit Bot

Request compressed texture extensions when initializing WebGL extension modules

These extensions were being exposed as requestable but failing to
initialize because they weren't requested.

BUG=angleproject:3675
BUG=983142

Change-Id: I7b8be3c49860bac5c62cb5df6cfb77f1ecf120b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1698643
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: default avatarKai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677052}
parent 68768780
...@@ -552,7 +552,6 @@ crbug.com/906724 [ android opengles ] conformance/textures/video/tex-2d-luminanc ...@@ -552,7 +552,6 @@ crbug.com/906724 [ android opengles ] conformance/textures/video/tex-2d-luminanc
# Misc failures # Misc failures
crbug.com/angleproject/2988 [ android opengles ] conformance/context/context-size-change.html [ Failure ] crbug.com/angleproject/2988 [ android opengles ] conformance/context/context-size-change.html [ Failure ]
crbug.com/angleproject/1552 [ android opengles ] WebglExtension_WEBGL_compressed_texture_etc1 [ Failure ]
############ ############
# ChromeOS # # ChromeOS #
......
...@@ -29,6 +29,9 @@ const WebGLCompressedTextureASTC::BlockSizeCompressASTC ...@@ -29,6 +29,9 @@ const WebGLCompressedTextureASTC::BlockSizeCompressASTC
WebGLCompressedTextureASTC::WebGLCompressedTextureASTC( WebGLCompressedTextureASTC::WebGLCompressedTextureASTC(
WebGLRenderingContextBase* context) WebGLRenderingContextBase* context)
: WebGLExtension(context) { : WebGLExtension(context) {
context->ExtensionsUtil()->EnsureExtensionEnabled(
"GL_KHR_texture_compression_astc_ldr");
const int kAlphaFormatGap = const int kAlphaFormatGap =
GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR - GL_COMPRESSED_RGBA_ASTC_4x4_KHR; GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR - GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
......
...@@ -11,6 +11,9 @@ namespace blink { ...@@ -11,6 +11,9 @@ namespace blink {
WebGLCompressedTextureETC1::WebGLCompressedTextureETC1( WebGLCompressedTextureETC1::WebGLCompressedTextureETC1(
WebGLRenderingContextBase* context) WebGLRenderingContextBase* context)
: WebGLExtension(context) { : WebGLExtension(context) {
context->ExtensionsUtil()->EnsureExtensionEnabled(
"GL_OES_compressed_ETC1_RGB8_texture");
context->AddCompressedTextureFormat(GL_ETC1_RGB8_OES); context->AddCompressedTextureFormat(GL_ETC1_RGB8_OES);
} }
......
...@@ -32,6 +32,9 @@ namespace blink { ...@@ -32,6 +32,9 @@ namespace blink {
WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC( WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC(
WebGLRenderingContextBase* context) WebGLRenderingContextBase* context)
: WebGLExtension(context) { : WebGLExtension(context) {
context->ExtensionsUtil()->EnsureExtensionEnabled(
"GL_IMG_texture_compression_pvrtc");
context->AddCompressedTextureFormat(GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG); context->AddCompressedTextureFormat(GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG);
context->AddCompressedTextureFormat(GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG); context->AddCompressedTextureFormat(GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG);
context->AddCompressedTextureFormat(GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG); context->AddCompressedTextureFormat(GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG);
......
...@@ -32,6 +32,15 @@ namespace blink { ...@@ -32,6 +32,15 @@ namespace blink {
WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC( WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC(
WebGLRenderingContextBase* context) WebGLRenderingContextBase* context)
: WebGLExtension(context) { : WebGLExtension(context) {
context->ExtensionsUtil()->EnsureExtensionEnabled(
"GL_EXT_texture_compression_s3tc");
context->ExtensionsUtil()->EnsureExtensionEnabled(
"GL_ANGLE_texture_compression_dxt1");
context->ExtensionsUtil()->EnsureExtensionEnabled(
"GL_ANGLE_texture_compression_dxt3");
context->ExtensionsUtil()->EnsureExtensionEnabled(
"GL_ANGLE_texture_compression_dxt5");
context->AddCompressedTextureFormat(GL_COMPRESSED_RGB_S3TC_DXT1_EXT); context->AddCompressedTextureFormat(GL_COMPRESSED_RGB_S3TC_DXT1_EXT);
context->AddCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT); context->AddCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT);
context->AddCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT); context->AddCompressedTextureFormat(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT);
......
...@@ -11,6 +11,9 @@ namespace blink { ...@@ -11,6 +11,9 @@ namespace blink {
WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB( WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB(
WebGLRenderingContextBase* context) WebGLRenderingContextBase* context)
: WebGLExtension(context) { : WebGLExtension(context) {
context->ExtensionsUtil()->EnsureExtensionEnabled(
"GL_EXT_texture_compression_s3tc_srgb");
// TODO(kainino): update these with _EXT versions once // TODO(kainino): update these with _EXT versions once
// GL_EXT_compressed_texture_s3tc_srgb is ratified // GL_EXT_compressed_texture_s3tc_srgb is ratified
context->AddCompressedTextureFormat(GL_COMPRESSED_SRGB_S3TC_DXT1_NV); context->AddCompressedTextureFormat(GL_COMPRESSED_SRGB_S3TC_DXT1_NV);
......
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