summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Mineer <amineer@google.com>2015-06-02 15:43:32 -0700
committerAlex Mineer <amineer@google.com>2015-06-02 22:45:03 +0000
commit87ce8cdaccaae8f24b58185228905daaf42fd901 (patch)
treefa8409e7fc6b1add127b90e56dcc25b57828e5ba
parentf36833bdfaa4ec31f08b8ad5ff05ed0cb863d945 (diff)
downloadchromium_src-87ce8cdaccaae8f24b58185228905daaf42fd901.zip
chromium_src-87ce8cdaccaae8f24b58185228905daaf42fd901.tar.gz
chromium_src-87ce8cdaccaae8f24b58185228905daaf42fd901.tar.bz2
gpu: Add disable_blend_equation_advanced workaround for Adreno 4xx.
Use of GL_KHR_blend_equation_advance blends for GPU compositing results in severe graphical corruption. This workaround disables the extension on Android, Adreno 4xx GPUs. BUG=488485 Review URL: https://codereview.chromium.org/1154953004 Cr-Commit-Position: refs/heads/master@{#331220} (cherry picked from commit 76d0b5d711b3292aecbd04a388ebd2d7d221385d) Review URL: https://codereview.chromium.org/1161553009 Cr-Commit-Position: refs/branch-heads/2403@{#105} Cr-Branched-From: f54b8097a9c45ed4ad308133d49f05325d6c5070-refs/heads/master@{#330231} (cherry picked from commit 1ce683f8e8557740902fb396dedeefe3c45256ce) Review URL: https://codereview.chromium.org/1158323006 (cherry picked from commit 103d7373a955befbb6501ede3c7bb877b1505ea0) Cr-Original-Commit-Position: refs/branch-heads/2357_78@{#2} Cr-Original-Branched-From: 59c2c8e04185c111e4feb57918d233fe8d869197-refs/branch-heads/2357@{#424} Cr-Original-Branched-From: 59d4494849b405682265ed5d3f5164573b9a939b-refs/heads/master@{#323860} Cr-Commit-Position: refs/branch-heads/2357@{#455} Cr-Branched-From: 59d4494849b405682265ed5d3f5164573b9a939b-refs/heads/master@{#323860}
-rw-r--r--gpu/command_buffer/service/feature_info.cc66
-rw-r--r--gpu/command_buffer/service/feature_info_unittest.cc12
-rw-r--r--gpu/config/gpu_driver_bug_list_json.cc15
-rw-r--r--gpu/config/gpu_driver_bug_workaround_type.h2
4 files changed, 62 insertions, 33 deletions
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 24fbfbe..ebc306e 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -1017,38 +1017,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")) {
diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc
index f4b2dac..ac9ffa8 100644
--- a/gpu/command_buffer/service/feature_info_unittest.cc
+++ b/gpu/command_buffer/service/feature_info_unittest.cc
@@ -1386,6 +1386,18 @@ TEST_F(FeatureInfoTest, ARBSyncDisabled) {
EXPECT_FALSE(gfx::GLFence::IsSupported());
}
+TEST_F(FeatureInfoTest, BlendEquationAdvancedDisabled) {
+ base::CommandLine command_line(0, NULL);
+ command_line.AppendSwitchASCII(
+ switches::kGpuDriverBugWorkarounds,
+ base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED));
+ SetupInitExpectationsWithCommandLine(
+ "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced",
+ command_line);
+ EXPECT_FALSE(info_->feature_flags().blend_equation_advanced);
+ EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent);
+}
+
TEST_F(FeatureInfoTest, InitializeCHROMIUM_path_rendering) {
SetupInitExpectationsWithGLVersion(
"GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access",
diff --git a/gpu/config/gpu_driver_bug_list_json.cc b/gpu/config/gpu_driver_bug_list_json.cc
index f5d4a2f..ee7adbea 100644
--- a/gpu/config/gpu_driver_bug_list_json.cc
+++ b/gpu/config/gpu_driver_bug_list_json.cc
@@ -19,7 +19,7 @@ const char kGpuDriverBugListJson[] = LONG_STRING_CONST(
{
"name": "gpu driver bug list",
// Please update the version number whenever you change this file.
- "version": "8.06",
+ "version": "8.07",
"entries": [
{
"id": 1,
@@ -1259,6 +1259,19 @@ LONG_STRING_CONST(
"features": [
"disable_egl_khr_wait_sync"
]
+ },
+ {
+ "id": 117,
+ "description": "GL_KHR_blend_equation_advanced breaks blending on Adreno 4xx",
+ "cr_bugs": [488485],
+ "os": {
+ "type": "android"
+ },
+ "gl_vendor": "Qualcomm.*",
+ "gl_renderer": ".*4\\d\\d",
+ "features": [
+ "disable_blend_equation_advanced"
+ ]
}
]
}
diff --git a/gpu/config/gpu_driver_bug_workaround_type.h b/gpu/config/gpu_driver_bug_workaround_type.h
index 32a5ff1..56d95f7 100644
--- a/gpu/config/gpu_driver_bug_workaround_type.h
+++ b/gpu/config/gpu_driver_bug_workaround_type.h
@@ -24,6 +24,8 @@
disable_arb_sync) \
GPU_OP(DISABLE_ASYNC_READPIXELS, \
disable_async_readpixels) \
+ GPU_OP(DISABLE_BLEND_EQUATION_ADVANCED, \
+ disable_blend_equation_advanced) \
GPU_OP(DISABLE_CHROMIUM_FRAMEBUFFER_MULTISAMPLE, \
disable_chromium_framebuffer_multisample) \
GPU_OP(DISABLE_D3D11, \