| 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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 validators_.g_l_state.AddValue(GL_MAX_DRAW_BUFFERS_ARB); | 770 validators_.g_l_state.AddValue(GL_MAX_DRAW_BUFFERS_ARB); |
| 771 GLint max_draw_buffers = 0; | 771 GLint max_draw_buffers = 0; |
| 772 glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers); | 772 glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers); |
| 773 for (GLenum i = GL_DRAW_BUFFER0_ARB; | 773 for (GLenum i = GL_DRAW_BUFFER0_ARB; |
| 774 i < static_cast<GLenum>(GL_DRAW_BUFFER0_ARB + max_draw_buffers); | 774 i < static_cast<GLenum>(GL_DRAW_BUFFER0_ARB + max_draw_buffers); |
| 775 ++i) { | 775 ++i) { |
| 776 validators_.g_l_state.AddValue(i); | 776 validators_.g_l_state.AddValue(i); |
| 777 } | 777 } |
| 778 } | 778 } |
| 779 | 779 |
| 780 if (extensions.Contains("GL_EXT_blend_minmax") || |
| 781 gfx::HasDesktopGLFeatures()) { |
| 782 AddExtensionString("GL_EXT_blend_minmax"); |
| 783 validators_.equation.AddValue(GL_MIN_EXT); |
| 784 validators_.equation.AddValue(GL_MAX_EXT); |
| 785 } |
| 786 |
| 780 if (extensions.Contains("GL_EXT_frag_depth") || gfx::HasDesktopGLFeatures()) { | 787 if (extensions.Contains("GL_EXT_frag_depth") || gfx::HasDesktopGLFeatures()) { |
| 781 AddExtensionString("GL_EXT_frag_depth"); | 788 AddExtensionString("GL_EXT_frag_depth"); |
| 782 feature_flags_.ext_frag_depth = true; | 789 feature_flags_.ext_frag_depth = true; |
| 783 } | 790 } |
| 784 | 791 |
| 785 if (extensions.Contains("GL_EXT_shader_texture_lod") || | 792 if (extensions.Contains("GL_EXT_shader_texture_lod") || |
| 786 gfx::HasDesktopGLFeatures()) { | 793 gfx::HasDesktopGLFeatures()) { |
| 787 AddExtensionString("GL_EXT_shader_texture_lod"); | 794 AddExtensionString("GL_EXT_shader_texture_lod"); |
| 788 feature_flags_.ext_shader_texture_lod = true; | 795 feature_flags_.ext_shader_texture_lod = true; |
| 789 } | 796 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 if (pos == std::string::npos) { | 844 if (pos == std::string::npos) { |
| 838 extensions_ += (extensions_.empty() ? "" : " ") + str; | 845 extensions_ += (extensions_.empty() ? "" : " ") + str; |
| 839 } | 846 } |
| 840 } | 847 } |
| 841 | 848 |
| 842 FeatureInfo::~FeatureInfo() { | 849 FeatureInfo::~FeatureInfo() { |
| 843 } | 850 } |
| 844 | 851 |
| 845 } // namespace gles2 | 852 } // namespace gles2 |
| 846 } // namespace gpu | 853 } // namespace gpu |
| OLD | NEW |