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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/feature_info.cc
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 12a958eaf603e2348a20e47af23eb45534038ce5..c86de231fd4695af0574699fbab0570a12d47675 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -973,38 +973,40 @@ void FeatureInfo::InitializeFeatures() {
feature_flags_.chromium_sync_query = true;
}
- bool blend_equation_advanced_coherent =
- extensions.Contains("GL_NV_blend_equation_advanced_coherent") ||
- extensions.Contains("GL_KHR_blend_equation_advanced_coherent");
-
- if (blend_equation_advanced_coherent ||
- extensions.Contains("GL_NV_blend_equation_advanced") ||
- extensions.Contains("GL_KHR_blend_equation_advanced")) {
- const GLenum equations[] = {GL_MULTIPLY_KHR,
- GL_SCREEN_KHR,
- GL_OVERLAY_KHR,
- GL_DARKEN_KHR,
- GL_LIGHTEN_KHR,
- GL_COLORDODGE_KHR,
- GL_COLORBURN_KHR,
- GL_HARDLIGHT_KHR,
- GL_SOFTLIGHT_KHR,
- GL_DIFFERENCE_KHR,
- GL_EXCLUSION_KHR,
- GL_HSL_HUE_KHR,
- GL_HSL_SATURATION_KHR,
- GL_HSL_COLOR_KHR,
- GL_HSL_LUMINOSITY_KHR};
-
- for (GLenum equation : equations)
- validators_.equation.AddValue(equation);
- if (blend_equation_advanced_coherent)
- AddExtensionString("GL_KHR_blend_equation_advanced_coherent");
-
- AddExtensionString("GL_KHR_blend_equation_advanced");
- feature_flags_.blend_equation_advanced = true;
- feature_flags_.blend_equation_advanced_coherent =
- blend_equation_advanced_coherent;
+ if (!workarounds_.disable_blend_equation_advanced) {
+ bool blend_equation_advanced_coherent =
+ extensions.Contains("GL_NV_blend_equation_advanced_coherent") ||
+ extensions.Contains("GL_KHR_blend_equation_advanced_coherent");
+
+ if (blend_equation_advanced_coherent ||
+ extensions.Contains("GL_NV_blend_equation_advanced") ||
+ extensions.Contains("GL_KHR_blend_equation_advanced")) {
+ const GLenum equations[] = {GL_MULTIPLY_KHR,
+ GL_SCREEN_KHR,
+ GL_OVERLAY_KHR,
+ GL_DARKEN_KHR,
+ GL_LIGHTEN_KHR,
+ GL_COLORDODGE_KHR,
+ GL_COLORBURN_KHR,
+ GL_HARDLIGHT_KHR,
+ GL_SOFTLIGHT_KHR,
+ GL_DIFFERENCE_KHR,
+ GL_EXCLUSION_KHR,
+ GL_HSL_HUE_KHR,
+ GL_HSL_SATURATION_KHR,
+ GL_HSL_COLOR_KHR,
+ GL_HSL_LUMINOSITY_KHR};
+
+ for (GLenum equation : equations)
+ validators_.equation.AddValue(equation);
+ if (blend_equation_advanced_coherent)
+ AddExtensionString("GL_KHR_blend_equation_advanced_coherent");
+
+ AddExtensionString("GL_KHR_blend_equation_advanced");
+ feature_flags_.blend_equation_advanced = true;
+ feature_flags_.blend_equation_advanced_coherent =
+ blend_equation_advanced_coherent;
+ }
}
if (extensions.Contains("GL_NV_path_rendering")) {
« 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