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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 ext_shader_texture_lod(false), | 137 ext_shader_texture_lod(false), |
138 use_async_readpixels(false), | 138 use_async_readpixels(false), |
139 map_buffer_range(false), | 139 map_buffer_range(false), |
140 ext_discard_framebuffer(false), | 140 ext_discard_framebuffer(false), |
141 angle_depth_texture(false), | 141 angle_depth_texture(false), |
142 is_angle(false), | 142 is_angle(false), |
143 is_swiftshader(false), | 143 is_swiftshader(false), |
144 angle_texture_usage(false), | 144 angle_texture_usage(false), |
145 ext_texture_storage(false), | 145 ext_texture_storage(false), |
146 chromium_path_rendering(false), | 146 chromium_path_rendering(false), |
147 ext_blend_minmax(false), | |
148 blend_equation_advanced(false), | 147 blend_equation_advanced(false), |
149 blend_equation_advanced_coherent(false) { | 148 blend_equation_advanced_coherent(false) { |
150 } | 149 } |
151 | 150 |
152 FeatureInfo::Workarounds::Workarounds() : | 151 FeatureInfo::Workarounds::Workarounds() : |
153 #define GPU_OP(type, name) name(false), | 152 #define GPU_OP(type, name) name(false), |
154 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) | 153 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
155 #undef GPU_OP | 154 #undef GPU_OP |
156 max_texture_size(0), | 155 max_texture_size(0), |
157 max_cube_map_texture_size(0), | 156 max_cube_map_texture_size(0), |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers); | 812 glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers); |
814 for (GLenum i = GL_DRAW_BUFFER0_ARB; | 813 for (GLenum i = GL_DRAW_BUFFER0_ARB; |
815 i < static_cast<GLenum>(GL_DRAW_BUFFER0_ARB + max_draw_buffers); | 814 i < static_cast<GLenum>(GL_DRAW_BUFFER0_ARB + max_draw_buffers); |
816 ++i) { | 815 ++i) { |
817 validators_.g_l_state.AddValue(i); | 816 validators_.g_l_state.AddValue(i); |
818 } | 817 } |
819 } | 818 } |
820 | 819 |
821 if (is_es3 || extensions.Contains("GL_EXT_blend_minmax") || | 820 if (is_es3 || extensions.Contains("GL_EXT_blend_minmax") || |
822 gfx::HasDesktopGLFeatures()) { | 821 gfx::HasDesktopGLFeatures()) { |
823 feature_flags_.ext_blend_minmax = true; | |
824 AddExtensionString("GL_EXT_blend_minmax"); | 822 AddExtensionString("GL_EXT_blend_minmax"); |
825 validators_.equation.AddValue(GL_MIN_EXT); | 823 validators_.equation.AddValue(GL_MIN_EXT); |
826 validators_.equation.AddValue(GL_MAX_EXT); | 824 validators_.equation.AddValue(GL_MAX_EXT); |
827 COMPILE_ASSERT(GL_MIN_EXT == GL_MIN && GL_MAX_EXT == GL_MAX, | 825 COMPILE_ASSERT(GL_MIN_EXT == GL_MIN && GL_MAX_EXT == GL_MAX, |
828 min_max_variations_must_match); | 826 min_max_variations_must_match); |
829 } | 827 } |
830 | 828 |
831 // TODO(dshwang): GLES3 supports gl_FragDepth, not gl_FragDepthEXT. | 829 // TODO(dshwang): GLES3 supports gl_FragDepth, not gl_FragDepthEXT. |
832 if (extensions.Contains("GL_EXT_frag_depth") || gfx::HasDesktopGLFeatures()) { | 830 if (extensions.Contains("GL_EXT_frag_depth") || gfx::HasDesktopGLFeatures()) { |
833 AddExtensionString("GL_EXT_frag_depth"); | 831 AddExtensionString("GL_EXT_frag_depth"); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 if (pos == std::string::npos) { | 936 if (pos == std::string::npos) { |
939 extensions_ += (extensions_.empty() ? "" : " ") + str; | 937 extensions_ += (extensions_.empty() ? "" : " ") + str; |
940 } | 938 } |
941 } | 939 } |
942 | 940 |
943 FeatureInfo::~FeatureInfo() { | 941 FeatureInfo::~FeatureInfo() { |
944 } | 942 } |
945 | 943 |
946 } // namespace gles2 | 944 } // namespace gles2 |
947 } // namespace gpu | 945 } // namespace gpu |
OLD | NEW |