| 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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 feature_flags_.chromium_framebuffer_multisample = true; | 866 feature_flags_.chromium_framebuffer_multisample = true; |
| 867 validators_.frame_buffer_target.AddValue(GL_READ_FRAMEBUFFER_EXT); | 867 validators_.frame_buffer_target.AddValue(GL_READ_FRAMEBUFFER_EXT); |
| 868 validators_.frame_buffer_target.AddValue(GL_DRAW_FRAMEBUFFER_EXT); | 868 validators_.frame_buffer_target.AddValue(GL_DRAW_FRAMEBUFFER_EXT); |
| 869 validators_.g_l_state.AddValue(GL_READ_FRAMEBUFFER_BINDING_EXT); | 869 validators_.g_l_state.AddValue(GL_READ_FRAMEBUFFER_BINDING_EXT); |
| 870 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); | 870 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); |
| 871 validators_.render_buffer_parameter.AddValue(GL_RENDERBUFFER_SAMPLES_EXT); | 871 validators_.render_buffer_parameter.AddValue(GL_RENDERBUFFER_SAMPLES_EXT); |
| 872 AddExtensionString("GL_CHROMIUM_framebuffer_multisample"); | 872 AddExtensionString("GL_CHROMIUM_framebuffer_multisample"); |
| 873 } | 873 } |
| 874 } | 874 } |
| 875 | 875 |
| 876 if (!workarounds_.disable_multisampled_render_to_texture) { | 876 if (extensions.Contains("GL_EXT_multisampled_render_to_texture")) { |
| 877 if (extensions.Contains("GL_EXT_multisampled_render_to_texture")) { | 877 feature_flags_.multisampled_render_to_texture = true; |
| 878 feature_flags_.multisampled_render_to_texture = true; | 878 } else if (extensions.Contains("GL_IMG_multisampled_render_to_texture")) { |
| 879 } else if (extensions.Contains("GL_IMG_multisampled_render_to_texture")) { | 879 feature_flags_.multisampled_render_to_texture = true; |
| 880 feature_flags_.multisampled_render_to_texture = true; | 880 feature_flags_.use_img_for_multisampled_render_to_texture = true; |
| 881 feature_flags_.use_img_for_multisampled_render_to_texture = true; | 881 } |
| 882 } | 882 if (feature_flags_.multisampled_render_to_texture) { |
| 883 if (feature_flags_.multisampled_render_to_texture) { | 883 validators_.render_buffer_parameter.AddValue( |
| 884 validators_.render_buffer_parameter.AddValue( | 884 GL_RENDERBUFFER_SAMPLES_EXT); |
| 885 GL_RENDERBUFFER_SAMPLES_EXT); | 885 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); |
| 886 validators_.g_l_state.AddValue(GL_MAX_SAMPLES_EXT); | 886 validators_.frame_buffer_parameter.AddValue( |
| 887 validators_.frame_buffer_parameter.AddValue( | 887 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT); |
| 888 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT); | 888 AddExtensionString("GL_EXT_multisampled_render_to_texture"); |
| 889 AddExtensionString("GL_EXT_multisampled_render_to_texture"); | |
| 890 } | |
| 891 } | 889 } |
| 892 | 890 |
| 893 if (!gl_version_info_->is_es || | 891 if (!gl_version_info_->is_es || |
| 894 extensions.Contains("GL_EXT_multisample_compatibility")) { | 892 extensions.Contains("GL_EXT_multisample_compatibility")) { |
| 895 AddExtensionString("GL_EXT_multisample_compatibility"); | 893 AddExtensionString("GL_EXT_multisample_compatibility"); |
| 896 feature_flags_.ext_multisample_compatibility = true; | 894 feature_flags_.ext_multisample_compatibility = true; |
| 897 validators_.capability.AddValue(GL_MULTISAMPLE_EXT); | 895 validators_.capability.AddValue(GL_MULTISAMPLE_EXT); |
| 898 validators_.capability.AddValue(GL_SAMPLE_ALPHA_TO_ONE_EXT); | 896 validators_.capability.AddValue(GL_SAMPLE_ALPHA_TO_ONE_EXT); |
| 899 } | 897 } |
| 900 | 898 |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 if (pos == std::string::npos) { | 1449 if (pos == std::string::npos) { |
| 1452 extensions_ += (extensions_.empty() ? "" : " ") + str; | 1450 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 1453 } | 1451 } |
| 1454 } | 1452 } |
| 1455 | 1453 |
| 1456 FeatureInfo::~FeatureInfo() { | 1454 FeatureInfo::~FeatureInfo() { |
| 1457 } | 1455 } |
| 1458 | 1456 |
| 1459 } // namespace gles2 | 1457 } // namespace gles2 |
| 1460 } // namespace gpu | 1458 } // namespace gpu |
| OLD | NEW |