Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/command_buffer/service/feature_info.h" | 5 #include "gpu/command_buffer/service/feature_info.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1005 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES); | 1005 validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES); |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture")) { | 1008 if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture")) { |
| 1009 AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture"); | 1009 AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture"); |
| 1010 feature_flags_.oes_compressed_etc1_rgb8_texture = true; | 1010 feature_flags_.oes_compressed_etc1_rgb8_texture = true; |
| 1011 validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES); | 1011 validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES); |
| 1012 validators_.texture_internal_format_storage.AddValue(GL_ETC1_RGB8_OES); | 1012 validators_.texture_internal_format_storage.AddValue(GL_ETC1_RGB8_OES); |
| 1013 } | 1013 } |
| 1014 | 1014 |
| 1015 // TODO(kainino): Once we have a way to query whether ANGLE is exposing | |
| 1016 // native support for ETC2 textures, require that here. | |
| 1017 if (gl_version_info_->is_es3) { | |
| 1018 AddExtensionString("GL_CHROMIUM_compressed_texture_es3_0"); | |
| 1019 validators_.compressed_texture_format.AddValue( | |
| 1020 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
| |
| 1021 validators_.compressed_texture_format.AddValue( | |
| 1022 GL_COMPRESSED_SIGNED_R11_EAC); | |
| 1023 validators_.compressed_texture_format.AddValue( | |
| 1024 GL_COMPRESSED_RGB8_ETC2); | |
| 1025 validators_.compressed_texture_format.AddValue( | |
| 1026 GL_COMPRESSED_SRGB8_ETC2); | |
| 1027 validators_.compressed_texture_format.AddValue( | |
| 1028 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2); | |
| 1029 validators_.compressed_texture_format.AddValue( | |
| 1030 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2); | |
| 1031 validators_.compressed_texture_format.AddValue( | |
| 1032 GL_COMPRESSED_RG11_EAC); | |
| 1033 validators_.compressed_texture_format.AddValue( | |
| 1034 GL_COMPRESSED_SIGNED_RG11_EAC); | |
| 1035 validators_.compressed_texture_format.AddValue( | |
| 1036 GL_COMPRESSED_RGBA8_ETC2_EAC); | |
| 1037 validators_.compressed_texture_format.AddValue( | |
| 1038 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC); | |
| 1039 | |
| 1040 validators_.texture_internal_format_storage.AddValue( | |
| 1041 GL_COMPRESSED_R11_EAC); | |
| 1042 validators_.texture_internal_format_storage.AddValue( | |
| 1043 GL_COMPRESSED_SIGNED_R11_EAC); | |
| 1044 validators_.texture_internal_format_storage.AddValue( | |
| 1045 GL_COMPRESSED_RGB8_ETC2); | |
| 1046 validators_.texture_internal_format_storage.AddValue( | |
| 1047 GL_COMPRESSED_SRGB8_ETC2); | |
| 1048 validators_.texture_internal_format_storage.AddValue( | |
| 1049 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2); | |
| 1050 validators_.texture_internal_format_storage.AddValue( | |
| 1051 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2); | |
| 1052 validators_.texture_internal_format_storage.AddValue( | |
| 1053 GL_COMPRESSED_RG11_EAC); | |
| 1054 validators_.texture_internal_format_storage.AddValue( | |
| 1055 GL_COMPRESSED_SIGNED_RG11_EAC); | |
| 1056 validators_.texture_internal_format_storage.AddValue( | |
| 1057 GL_COMPRESSED_RGBA8_ETC2_EAC); | |
| 1058 validators_.texture_internal_format_storage.AddValue( | |
| 1059 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC); | |
| 1060 } | |
| 1061 | |
| 1015 if (extensions.Contains("GL_AMD_compressed_ATC_texture")) { | 1062 if (extensions.Contains("GL_AMD_compressed_ATC_texture")) { |
| 1016 AddExtensionString("GL_AMD_compressed_ATC_texture"); | 1063 AddExtensionString("GL_AMD_compressed_ATC_texture"); |
| 1017 validators_.compressed_texture_format.AddValue( | 1064 validators_.compressed_texture_format.AddValue( |
| 1018 GL_ATC_RGB_AMD); | 1065 GL_ATC_RGB_AMD); |
| 1019 validators_.compressed_texture_format.AddValue( | 1066 validators_.compressed_texture_format.AddValue( |
| 1020 GL_ATC_RGBA_EXPLICIT_ALPHA_AMD); | 1067 GL_ATC_RGBA_EXPLICIT_ALPHA_AMD); |
| 1021 validators_.compressed_texture_format.AddValue( | 1068 validators_.compressed_texture_format.AddValue( |
| 1022 GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD); | 1069 GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD); |
| 1023 | 1070 |
| 1024 validators_.texture_internal_format_storage.AddValue( | 1071 validators_.texture_internal_format_storage.AddValue( |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1531 if (pos == std::string::npos) { | 1578 if (pos == std::string::npos) { |
| 1532 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1579 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1533 } | 1580 } |
| 1534 } | 1581 } |
| 1535 | 1582 |
| 1536 FeatureInfo::~FeatureInfo() { | 1583 FeatureInfo::~FeatureInfo() { |
| 1537 } | 1584 } |
| 1538 | 1585 |
| 1539 } // namespace gles2 | 1586 } // namespace gles2 |
| 1540 } // namespace gpu | 1587 } // namespace gpu |
| OLD | NEW |