Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: gpu/command_buffer/service/feature_info.cc

Issue 2354713004: Implement WEBGL_compressed_texture_es3_0 extension for WebGL 1/2 (Closed)
Patch Set: additional testing Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/feature_info.cc
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index cf483ab1e562f2a7391b79c40762244610d13141..4151539a2f7837a18df5d03b70d82d32f39f859e 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -1012,6 +1012,53 @@ void FeatureInfo::InitializeFeatures() {
validators_.texture_internal_format_storage.AddValue(GL_ETC1_RGB8_OES);
}
+ // TODO(kainino): Once we have a way to query whether ANGLE is exposing
+ // native support for ETC2 textures, require that here.
+ if (gl_version_info_->is_es3) {
+ AddExtensionString("GL_CHROMIUM_compressed_texture_es3_0");
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_R11_EAC);
Ken Russell (switch to Gerrit) 2016/09/21 00:16:07 I think we need to be careful about whether these
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_SIGNED_R11_EAC);
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_RGB8_ETC2);
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_SRGB8_ETC2);
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_RG11_EAC);
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_SIGNED_RG11_EAC);
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_RGBA8_ETC2_EAC);
+ validators_.compressed_texture_format.AddValue(
+ GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC);
+
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_R11_EAC);
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_SIGNED_R11_EAC);
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_RGB8_ETC2);
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_SRGB8_ETC2);
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2);
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_RG11_EAC);
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_SIGNED_RG11_EAC);
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_RGBA8_ETC2_EAC);
+ validators_.texture_internal_format_storage.AddValue(
+ GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC);
+ }
+
if (extensions.Contains("GL_AMD_compressed_ATC_texture")) {
AddExtensionString("GL_AMD_compressed_ATC_texture");
validators_.compressed_texture_format.AddValue(

Powered by Google App Engine
This is Rietveld 408576698