0

Explicitly disable DC overlay support on all except Intel GPUs

We ran into a user machine with AMD GPU that reports NV12 overlay cap.
This is a total surprise and we never tested overlays on non-Intel GPUs.

To be safe, let's turn off overlay support on all except Intel GPUs.

BUG=931399
TEST=manual
R=sunnyps@chromium.org,piman@chromium.org

Change-Id: I4e6edd558ac09679cc911c584a100655e99c59d0
Reviewed-on: https://chromium-review.googlesource.com/c/1487474
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635356}
This commit is contained in:
Zhenyao Mo
2019-02-26 01:40:42 +00:00
committed by Commit Bot
parent 3db3ffe4d4
commit d15d1acd36
4 changed files with 26 additions and 2 deletions

@ -3167,6 +3167,22 @@
"features": [
"gl_clear_broken"
]
},
{
"id": 294,
"cr_bugs": [931399],
"description": "Hardware overlays result in black videos on non-Intel GPUs",
"os": {
"type": "win"
},
"exceptions": [
{
"vendor_id": "0x8086"
}
],
"features": [
"disable_direct_composition_layers"
]
}
]
}

@ -236,9 +236,14 @@ void AppendWorkaroundsToCommandLine(const GpuFeatureInfo& gpu_feature_info,
DISABLE_ES3_GL_CONTEXT_FOR_TESTING)) {
command_line->AppendSwitch(switches::kDisableES3GLContextForTesting);
}
#if defined(OS_WIN)
if (gpu_feature_info.IsWorkaroundEnabled(DISABLE_DIRECT_COMPOSITION)) {
command_line->AppendSwitch(switches::kDisableDirectComposition);
}
if (gpu_feature_info.IsWorkaroundEnabled(DISABLE_DIRECT_COMPOSITION_LAYERS)) {
command_line->AppendSwitch(switches::kDisableDirectCompositionLayers);
}
#endif
}
// Adjust gpu feature status based on enabled gpu driver bug workarounds.

@ -22,6 +22,7 @@ disable_d3d11
disable_delayed_copy_nv12
disable_depth_texture
disable_direct_composition
disable_direct_composition_layers
disable_discard_framebuffer
disable_dxgi_zero_copy_video
disable_es3_gl_context

@ -1767,10 +1767,12 @@ bool DirectCompositionSurfaceWin::AreOverlaysSupported() {
InitializeHardwareOverlaySupport();
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kDisableDirectCompositionLayers))
return false;
// Enable flag should be checked before the disable flag, so we could
// overwrite GPU driver bug workarounds in testing.
if (command_line->HasSwitch(switches::kEnableDirectCompositionLayers))
return true;
if (command_line->HasSwitch(switches::kDisableDirectCompositionLayers))
return false;
return g_supports_overlays;
}