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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1305 validators_.texture_internal_format.AddValue(GL_RG8_EXT); | 1305 validators_.texture_internal_format.AddValue(GL_RG8_EXT); |
1306 validators_.read_pixel_format.AddValue(GL_RED_EXT); | 1306 validators_.read_pixel_format.AddValue(GL_RED_EXT); |
1307 validators_.read_pixel_format.AddValue(GL_RG_EXT); | 1307 validators_.read_pixel_format.AddValue(GL_RG_EXT); |
1308 validators_.render_buffer_format.AddValue(GL_R8_EXT); | 1308 validators_.render_buffer_format.AddValue(GL_R8_EXT); |
1309 validators_.render_buffer_format.AddValue(GL_RG8_EXT); | 1309 validators_.render_buffer_format.AddValue(GL_RG8_EXT); |
1310 validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT); | 1310 validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT); |
1311 validators_.texture_unsized_internal_format.AddValue(GL_RG_EXT); | 1311 validators_.texture_unsized_internal_format.AddValue(GL_RG_EXT); |
1312 } | 1312 } |
1313 UMA_HISTOGRAM_BOOLEAN("GPU.TextureRG", feature_flags_.ext_texture_rg); | 1313 UMA_HISTOGRAM_BOOLEAN("GPU.TextureRG", feature_flags_.ext_texture_rg); |
1314 | 1314 |
1315 if (gl_version_info_->is_desktop_core_profile || | 1315 if ((gl_version_info_->is_desktop_core_profile && |
1316 (gl_version_info_->IsAtLeastGL(3, 0) || | |
1317 extensions.Contains("GL_ARB_texture_rg"))) || | |
Ken Russell (switch to Gerrit)
2017/06/13 23:51:03
This isn't necessary. Looking more deeply, GL_ARB_
| |
1316 extensions.Contains("GL_EXT_texture_norm16")) { | 1318 extensions.Contains("GL_EXT_texture_norm16")) { |
1317 feature_flags_.ext_texture_norm16 = true; | 1319 feature_flags_.ext_texture_norm16 = true; |
1318 AddExtensionString("GL_EXT_texture_norm16"); | 1320 AddExtensionString("GL_EXT_texture_norm16"); |
1319 | 1321 |
1320 // Note: EXT_texture_norm16 is not exposed through WebGL API so we validate | 1322 // Note: EXT_texture_norm16 is not exposed through WebGL API so we validate |
1321 // only the combinations used internally. | 1323 // only the combinations used internally. |
1322 validators_.texture_format.AddValue(GL_RED_EXT); | 1324 validators_.texture_format.AddValue(GL_RED_EXT); |
1323 validators_.texture_internal_format.AddValue(GL_R16_EXT); | 1325 validators_.texture_internal_format.AddValue(GL_R16_EXT); |
1324 validators_.texture_internal_format.AddValue(GL_RED_EXT); | 1326 validators_.texture_internal_format.AddValue(GL_RED_EXT); |
1325 validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT); | 1327 validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT); |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1740 if (pos == std::string::npos) { | 1742 if (pos == std::string::npos) { |
1741 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1743 extensions_ += (extensions_.empty() ? "" : " ") + str; |
1742 } | 1744 } |
1743 } | 1745 } |
1744 | 1746 |
1745 FeatureInfo::~FeatureInfo() { | 1747 FeatureInfo::~FeatureInfo() { |
1746 } | 1748 } |
1747 | 1749 |
1748 } // namespace gles2 | 1750 } // namespace gles2 |
1749 } // namespace gpu | 1751 } // namespace gpu |
OLD | NEW |