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 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1274 validators_.texture_internal_format.AddValue(GL_RG8_EXT); | 1274 validators_.texture_internal_format.AddValue(GL_RG8_EXT); |
1275 validators_.read_pixel_format.AddValue(GL_RED_EXT); | 1275 validators_.read_pixel_format.AddValue(GL_RED_EXT); |
1276 validators_.read_pixel_format.AddValue(GL_RG_EXT); | 1276 validators_.read_pixel_format.AddValue(GL_RG_EXT); |
1277 validators_.render_buffer_format.AddValue(GL_R8_EXT); | 1277 validators_.render_buffer_format.AddValue(GL_R8_EXT); |
1278 validators_.render_buffer_format.AddValue(GL_RG8_EXT); | 1278 validators_.render_buffer_format.AddValue(GL_RG8_EXT); |
1279 validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT); | 1279 validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT); |
1280 validators_.texture_unsized_internal_format.AddValue(GL_RG_EXT); | 1280 validators_.texture_unsized_internal_format.AddValue(GL_RG_EXT); |
1281 } | 1281 } |
1282 UMA_HISTOGRAM_BOOLEAN("GPU.TextureRG", feature_flags_.ext_texture_rg); | 1282 UMA_HISTOGRAM_BOOLEAN("GPU.TextureRG", feature_flags_.ext_texture_rg); |
1283 | 1283 |
1284 if (enable_texture_storage && enable_texture_float && | |
1285 feature_flags_.ext_texture_rg) { | |
1286 validators_.texture_internal_format.AddValue(GL_R32F_EXT); | |
1287 } | |
1288 | |
1289 if (enable_texture_storage && enable_texture_half_float && | |
1290 feature_flags_.ext_texture_rg) { | |
1291 validators_.texture_internal_format.AddValue(GL_R16F_EXT); | |
1292 } | |
Ken Russell (switch to Gerrit)
2016/09/30 23:01:29
Instead of adding these values in separate if-stat
aleksandar.stojiljkovic
2016/10/03 10:56:52
tOn 2016/09/30 23:01:29, Ken Russell wrote:
| |
1293 | |
1284 bool has_opengl_dual_source_blending = | 1294 bool has_opengl_dual_source_blending = |
1285 gl_version_info_->IsAtLeastGL(3, 3) || | 1295 gl_version_info_->IsAtLeastGL(3, 3) || |
1286 (gl_version_info_->IsAtLeastGL(3, 2) && | 1296 (gl_version_info_->IsAtLeastGL(3, 2) && |
1287 extensions.Contains("GL_ARB_blend_func_extended")); | 1297 extensions.Contains("GL_ARB_blend_func_extended")); |
1288 if (!disable_shader_translator_ && | 1298 if (!disable_shader_translator_ && |
1289 ((gl_version_info_->IsAtLeastGL(3, 2) && | 1299 ((gl_version_info_->IsAtLeastGL(3, 2) && |
1290 has_opengl_dual_source_blending) || | 1300 has_opengl_dual_source_blending) || |
1291 (gl_version_info_->IsAtLeastGLES(3, 0) && | 1301 (gl_version_info_->IsAtLeastGLES(3, 0) && |
1292 extensions.Contains("GL_EXT_blend_func_extended")))) { | 1302 extensions.Contains("GL_EXT_blend_func_extended")))) { |
1293 // Note: to simplify the code, we do not expose EXT_blend_func_extended | 1303 // Note: to simplify the code, we do not expose EXT_blend_func_extended |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1463 if (pos == std::string::npos) { | 1473 if (pos == std::string::npos) { |
1464 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1474 extensions_ += (extensions_.empty() ? "" : " ") + str; |
1465 } | 1475 } |
1466 } | 1476 } |
1467 | 1477 |
1468 FeatureInfo::~FeatureInfo() { | 1478 FeatureInfo::~FeatureInfo() { |
1469 } | 1479 } |
1470 | 1480 |
1471 } // namespace gles2 | 1481 } // namespace gles2 |
1472 } // namespace gpu | 1482 } // namespace gpu |
OLD | NEW |