| 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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 if ((gl_version_info_->is_es3 || gl_version_info_->is_desktop_core_profile || | 1063 if ((gl_version_info_->is_es3 || gl_version_info_->is_desktop_core_profile || |
| 1064 extensions.Contains("GL_EXT_texture_rg") || | 1064 extensions.Contains("GL_EXT_texture_rg") || |
| 1065 extensions.Contains("GL_ARB_texture_rg")) && | 1065 extensions.Contains("GL_ARB_texture_rg")) && |
| 1066 IsGL_REDSupportedOnFBOs()) { | 1066 IsGL_REDSupportedOnFBOs()) { |
| 1067 feature_flags_.ext_texture_rg = true; | 1067 feature_flags_.ext_texture_rg = true; |
| 1068 AddExtensionString("GL_EXT_texture_rg"); | 1068 AddExtensionString("GL_EXT_texture_rg"); |
| 1069 | 1069 |
| 1070 validators_.texture_format.AddValue(GL_RED_EXT); | 1070 validators_.texture_format.AddValue(GL_RED_EXT); |
| 1071 validators_.texture_format.AddValue(GL_RG_EXT); | 1071 validators_.texture_format.AddValue(GL_RG_EXT); |
| 1072 validators_.texture_internal_format.AddValue(GL_RED_EXT); | 1072 validators_.texture_internal_format.AddValue(GL_RED_EXT); |
| 1073 validators_.texture_internal_format.AddValue(GL_R8_EXT); |
| 1073 validators_.texture_internal_format.AddValue(GL_RG_EXT); | 1074 validators_.texture_internal_format.AddValue(GL_RG_EXT); |
| 1075 validators_.texture_internal_format.AddValue(GL_RG8_EXT); |
| 1074 validators_.read_pixel_format.AddValue(GL_RED_EXT); | 1076 validators_.read_pixel_format.AddValue(GL_RED_EXT); |
| 1075 validators_.read_pixel_format.AddValue(GL_RG_EXT); | 1077 validators_.read_pixel_format.AddValue(GL_RG_EXT); |
| 1076 validators_.render_buffer_format.AddValue(GL_R8_EXT); | 1078 validators_.render_buffer_format.AddValue(GL_R8_EXT); |
| 1077 validators_.render_buffer_format.AddValue(GL_RG8_EXT); | 1079 validators_.render_buffer_format.AddValue(GL_RG8_EXT); |
| 1078 | 1080 |
| 1079 texture_format_validators_[GL_RED_EXT].AddValue(GL_UNSIGNED_BYTE); | 1081 texture_format_validators_[GL_RED_EXT].AddValue(GL_UNSIGNED_BYTE); |
| 1080 texture_format_validators_[GL_RG_EXT].AddValue(GL_UNSIGNED_BYTE); | 1082 texture_format_validators_[GL_RG_EXT].AddValue(GL_UNSIGNED_BYTE); |
| 1081 | 1083 |
| 1082 if (enable_texture_float) { | 1084 if (enable_texture_float) { |
| 1083 texture_format_validators_[GL_RED_EXT].AddValue(GL_FLOAT); | 1085 texture_format_validators_[GL_RED_EXT].AddValue(GL_FLOAT); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 if (pos == std::string::npos) { | 1131 if (pos == std::string::npos) { |
| 1130 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1132 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1131 } | 1133 } |
| 1132 } | 1134 } |
| 1133 | 1135 |
| 1134 FeatureInfo::~FeatureInfo() { | 1136 FeatureInfo::~FeatureInfo() { |
| 1135 } | 1137 } |
| 1136 | 1138 |
| 1137 } // namespace gles2 | 1139 } // namespace gles2 |
| 1138 } // namespace gpu | 1140 } // namespace gpu |
| OLD | NEW |