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/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 texture_format_validators_[GL_LUMINANCE_ALPHA].AddValue(GL_HALF_FLOAT_OES); | 505 texture_format_validators_[GL_LUMINANCE_ALPHA].AddValue(GL_HALF_FLOAT_OES); |
506 validators_.pixel_type.AddValue(GL_HALF_FLOAT_OES); | 506 validators_.pixel_type.AddValue(GL_HALF_FLOAT_OES); |
507 validators_.read_pixel_type.AddValue(GL_HALF_FLOAT_OES); | 507 validators_.read_pixel_type.AddValue(GL_HALF_FLOAT_OES); |
508 AddExtensionString("GL_OES_texture_half_float"); | 508 AddExtensionString("GL_OES_texture_half_float"); |
509 if (enable_texture_half_float_linear) { | 509 if (enable_texture_half_float_linear) { |
510 AddExtensionString("GL_OES_texture_half_float_linear"); | 510 AddExtensionString("GL_OES_texture_half_float_linear"); |
511 } | 511 } |
512 } | 512 } |
513 | 513 |
514 // Check for multisample support | 514 // Check for multisample support |
| 515 bool ext_has_multisample = ext.Have("GL_EXT_framebuffer_multisample"); |
| 516 if (!is_qualcomm || feature_flags_.disable_workarounds) { |
| 517 // Some Android Qualcomm drivers falsely report this ANGLE extension string. |
| 518 // See http://crbug.com/165736 |
| 519 ext_has_multisample |= ext.Have("GL_ANGLE_framebuffer_multisample"); |
| 520 } |
515 if (!disallowed_features_.multisampling && | 521 if (!disallowed_features_.multisampling && |
516 ext.Desire("GL_CHROMIUM_framebuffer_multisample") && | 522 ext.Desire("GL_CHROMIUM_framebuffer_multisample") && |
517 (ext.Have("GL_EXT_framebuffer_multisample") || | 523 ext_has_multisample) { |
518 ext.Have("GL_ANGLE_framebuffer_multisample"))) { | |
519 feature_flags_.chromium_framebuffer_multisample = true; | 524 feature_flags_.chromium_framebuffer_multisample = true; |
520 validators_.frame_buffer_target.AddValue(GL_READ_FRAMEBUFFER_EXT); | 525 validators_.frame_buffer_target.AddValue(GL_READ_FRAMEBUFFER_EXT); |
521 validators_.frame_buffer_target.AddValue(GL_DRAW_FRAMEBUFFER_EXT); | 526 validators_.frame_buffer_target.AddValue(GL_DRAW_FRAMEBUFFER_EXT); |
522 validators_.g_l_state.AddValue(GL_READ_FRAMEBUFFER_BINDING_EXT); | 527 validators_.g_l_state.AddValue(GL_READ_FRAMEBUFFER_BINDING_EXT); |
523 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); | 528 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); |
524 validators_.render_buffer_parameter.AddValue(GL_RENDERBUFFER_SAMPLES_EXT); | 529 validators_.render_buffer_parameter.AddValue(GL_RENDERBUFFER_SAMPLES_EXT); |
525 AddExtensionString("GL_CHROMIUM_framebuffer_multisample"); | 530 AddExtensionString("GL_CHROMIUM_framebuffer_multisample"); |
526 } | 531 } |
527 | 532 |
528 if (ext.HaveAndDesire("GL_OES_depth24") || | 533 if (ext.HaveAndDesire("GL_OES_depth24") || |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 if (extensions_.find(str) == std::string::npos) { | 719 if (extensions_.find(str) == std::string::npos) { |
715 extensions_ += (extensions_.empty() ? "" : " ") + str; | 720 extensions_ += (extensions_.empty() ? "" : " ") + str; |
716 } | 721 } |
717 } | 722 } |
718 | 723 |
719 FeatureInfo::~FeatureInfo() { | 724 FeatureInfo::~FeatureInfo() { |
720 } | 725 } |
721 | 726 |
722 } // namespace gles2 | 727 } // namespace gles2 |
723 } // namespace gpu | 728 } // namespace gpu |
OLD | NEW |