Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: gpu/command_buffer/service/feature_info.cc

Issue 614953002: Accelerate the lighten blendmode if GL_EXT_blend_minmax is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nit Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 ext_frag_depth(false), 135 ext_frag_depth(false),
136 ext_shader_texture_lod(false), 136 ext_shader_texture_lod(false),
137 use_async_readpixels(false), 137 use_async_readpixels(false),
138 map_buffer_range(false), 138 map_buffer_range(false),
139 ext_discard_framebuffer(false), 139 ext_discard_framebuffer(false),
140 angle_depth_texture(false), 140 angle_depth_texture(false),
141 is_angle(false), 141 is_angle(false),
142 is_swiftshader(false), 142 is_swiftshader(false),
143 angle_texture_usage(false), 143 angle_texture_usage(false),
144 ext_texture_storage(false), 144 ext_texture_storage(false),
145 chromium_path_rendering(false) { 145 chromium_path_rendering(false),
146 ext_blend_minmax(false) {
146 } 147 }
147 148
148 FeatureInfo::Workarounds::Workarounds() : 149 FeatureInfo::Workarounds::Workarounds() :
149 #define GPU_OP(type, name) name(false), 150 #define GPU_OP(type, name) name(false),
150 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) 151 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
151 #undef GPU_OP 152 #undef GPU_OP
152 max_texture_size(0), 153 max_texture_size(0),
153 max_cube_map_texture_size(0), 154 max_cube_map_texture_size(0),
154 max_fragment_uniform_vectors(0), 155 max_fragment_uniform_vectors(0),
155 max_varying_vectors(0), 156 max_varying_vectors(0),
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers); 783 glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &max_draw_buffers);
783 for (GLenum i = GL_DRAW_BUFFER0_ARB; 784 for (GLenum i = GL_DRAW_BUFFER0_ARB;
784 i < static_cast<GLenum>(GL_DRAW_BUFFER0_ARB + max_draw_buffers); 785 i < static_cast<GLenum>(GL_DRAW_BUFFER0_ARB + max_draw_buffers);
785 ++i) { 786 ++i) {
786 validators_.g_l_state.AddValue(i); 787 validators_.g_l_state.AddValue(i);
787 } 788 }
788 } 789 }
789 790
790 if (is_es3 || extensions.Contains("GL_EXT_blend_minmax") || 791 if (is_es3 || extensions.Contains("GL_EXT_blend_minmax") ||
791 gfx::HasDesktopGLFeatures()) { 792 gfx::HasDesktopGLFeatures()) {
793 feature_flags_.ext_blend_minmax = true;
792 AddExtensionString("GL_EXT_blend_minmax"); 794 AddExtensionString("GL_EXT_blend_minmax");
793 validators_.equation.AddValue(GL_MIN_EXT); 795 validators_.equation.AddValue(GL_MIN_EXT);
794 validators_.equation.AddValue(GL_MAX_EXT); 796 validators_.equation.AddValue(GL_MAX_EXT);
795 COMPILE_ASSERT(GL_MIN_EXT == GL_MIN && GL_MAX_EXT == GL_MAX, 797 COMPILE_ASSERT(GL_MIN_EXT == GL_MIN && GL_MAX_EXT == GL_MAX,
796 min_max_variations_must_match); 798 min_max_variations_must_match);
797 } 799 }
798 800
799 // TODO(dshwang): GLES3 supports gl_FragDepth, not gl_FragDepthEXT. 801 // TODO(dshwang): GLES3 supports gl_FragDepth, not gl_FragDepthEXT.
800 if (extensions.Contains("GL_EXT_frag_depth") || gfx::HasDesktopGLFeatures()) { 802 if (extensions.Contains("GL_EXT_frag_depth") || gfx::HasDesktopGLFeatures()) {
801 AddExtensionString("GL_EXT_frag_depth"); 803 AddExtensionString("GL_EXT_frag_depth");
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 if (pos == std::string::npos) { 874 if (pos == std::string::npos) {
873 extensions_ += (extensions_.empty() ? "" : " ") + str; 875 extensions_ += (extensions_.empty() ? "" : " ") + str;
874 } 876 }
875 } 877 }
876 878
877 FeatureInfo::~FeatureInfo() { 879 FeatureInfo::~FeatureInfo() {
878 } 880 }
879 881
880 } // namespace gles2 882 } // namespace gles2
881 } // namespace gpu 883 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698