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

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

Issue 1154953004: gpu: Add disable_blend_equation_advanced workaround for Adreno 4xx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 // DiscardFramebufferEXT is automatically bound to InvalidateFramebuffer. 966 // DiscardFramebufferEXT is automatically bound to InvalidateFramebuffer.
967 AddExtensionString("GL_EXT_discard_framebuffer"); 967 AddExtensionString("GL_EXT_discard_framebuffer");
968 feature_flags_.ext_discard_framebuffer = true; 968 feature_flags_.ext_discard_framebuffer = true;
969 } 969 }
970 970
971 if (ui_gl_fence_works) { 971 if (ui_gl_fence_works) {
972 AddExtensionString("GL_CHROMIUM_sync_query"); 972 AddExtensionString("GL_CHROMIUM_sync_query");
973 feature_flags_.chromium_sync_query = true; 973 feature_flags_.chromium_sync_query = true;
974 } 974 }
975 975
976 bool blend_equation_advanced_coherent = 976 if (!workarounds_.disable_blend_equation_advanced) {
977 extensions.Contains("GL_NV_blend_equation_advanced_coherent") || 977 bool blend_equation_advanced_coherent =
978 extensions.Contains("GL_KHR_blend_equation_advanced_coherent"); 978 extensions.Contains("GL_NV_blend_equation_advanced_coherent") ||
979 extensions.Contains("GL_KHR_blend_equation_advanced_coherent");
979 980
980 if (blend_equation_advanced_coherent || 981 if (blend_equation_advanced_coherent ||
981 extensions.Contains("GL_NV_blend_equation_advanced") || 982 extensions.Contains("GL_NV_blend_equation_advanced") ||
982 extensions.Contains("GL_KHR_blend_equation_advanced")) { 983 extensions.Contains("GL_KHR_blend_equation_advanced")) {
983 const GLenum equations[] = {GL_MULTIPLY_KHR, 984 const GLenum equations[] = {GL_MULTIPLY_KHR,
984 GL_SCREEN_KHR, 985 GL_SCREEN_KHR,
985 GL_OVERLAY_KHR, 986 GL_OVERLAY_KHR,
986 GL_DARKEN_KHR, 987 GL_DARKEN_KHR,
987 GL_LIGHTEN_KHR, 988 GL_LIGHTEN_KHR,
988 GL_COLORDODGE_KHR, 989 GL_COLORDODGE_KHR,
989 GL_COLORBURN_KHR, 990 GL_COLORBURN_KHR,
990 GL_HARDLIGHT_KHR, 991 GL_HARDLIGHT_KHR,
991 GL_SOFTLIGHT_KHR, 992 GL_SOFTLIGHT_KHR,
992 GL_DIFFERENCE_KHR, 993 GL_DIFFERENCE_KHR,
993 GL_EXCLUSION_KHR, 994 GL_EXCLUSION_KHR,
994 GL_HSL_HUE_KHR, 995 GL_HSL_HUE_KHR,
995 GL_HSL_SATURATION_KHR, 996 GL_HSL_SATURATION_KHR,
996 GL_HSL_COLOR_KHR, 997 GL_HSL_COLOR_KHR,
997 GL_HSL_LUMINOSITY_KHR}; 998 GL_HSL_LUMINOSITY_KHR};
998 999
999 for (GLenum equation : equations) 1000 for (GLenum equation : equations)
1000 validators_.equation.AddValue(equation); 1001 validators_.equation.AddValue(equation);
1001 if (blend_equation_advanced_coherent) 1002 if (blend_equation_advanced_coherent)
1002 AddExtensionString("GL_KHR_blend_equation_advanced_coherent"); 1003 AddExtensionString("GL_KHR_blend_equation_advanced_coherent");
1003 1004
1004 AddExtensionString("GL_KHR_blend_equation_advanced"); 1005 AddExtensionString("GL_KHR_blend_equation_advanced");
1005 feature_flags_.blend_equation_advanced = true; 1006 feature_flags_.blend_equation_advanced = true;
1006 feature_flags_.blend_equation_advanced_coherent = 1007 feature_flags_.blend_equation_advanced_coherent =
1007 blend_equation_advanced_coherent; 1008 blend_equation_advanced_coherent;
1009 }
1008 } 1010 }
1009 1011
1010 if (extensions.Contains("GL_NV_path_rendering")) { 1012 if (extensions.Contains("GL_NV_path_rendering")) {
1011 if (extensions.Contains("GL_EXT_direct_state_access") || 1013 if (extensions.Contains("GL_EXT_direct_state_access") ||
1012 gl_version_info_->is_es3) { 1014 gl_version_info_->is_es3) {
1013 AddExtensionString("GL_CHROMIUM_path_rendering"); 1015 AddExtensionString("GL_CHROMIUM_path_rendering");
1014 feature_flags_.chromium_path_rendering = true; 1016 feature_flags_.chromium_path_rendering = true;
1015 validators_.g_l_state.AddValue(GL_PATH_MODELVIEW_MATRIX_CHROMIUM); 1017 validators_.g_l_state.AddValue(GL_PATH_MODELVIEW_MATRIX_CHROMIUM);
1016 validators_.g_l_state.AddValue(GL_PATH_PROJECTION_MATRIX_CHROMIUM); 1018 validators_.g_l_state.AddValue(GL_PATH_PROJECTION_MATRIX_CHROMIUM);
1017 } 1019 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 if (pos == std::string::npos) { 1138 if (pos == std::string::npos) {
1137 extensions_ += (extensions_.empty() ? "" : " ") + str; 1139 extensions_ += (extensions_.empty() ? "" : " ") + str;
1138 } 1140 }
1139 } 1141 }
1140 1142
1141 FeatureInfo::~FeatureInfo() { 1143 FeatureInfo::~FeatureInfo() {
1142 } 1144 }
1143 1145
1144 } // namespace gles2 1146 } // namespace gles2
1145 } // namespace gpu 1147 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698