From ec2d3d249409826bc5b40fc1f485cbdac819bf3c Mon Sep 17 00:00:00 2001 From: Jamie Nicol Date: Wed, 12 May 2021 13:03:51 +0000 Subject: [PATCH] Bug 1609191 - Disable webrender on devices affected by Adreno shader compilation crash. r=nical We encounter frequent crashes in glLinkProgram on some Adreno devices. This is likely due to a driver bug, but we have been unable to figure out the exact cause and work around it. According to the crash data, this bug appears to affect Adreno 505 and 506 devices running Android 9 only. Disable webrender on these devices in order to avoid the crash. Depends on D114949 Differential Revision: https://phabricator.services.mozilla.com/D114950 --- widget/android/GfxInfo.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/widget/android/GfxInfo.cpp b/widget/android/GfxInfo.cpp index 3122bde30587..ed65710ea3e4 100644 --- a/widget/android/GfxInfo.cpp +++ b/widget/android/GfxInfo.cpp @@ -599,12 +599,20 @@ nsresult GfxInfo::GetFeatureStatusImpl( const nsCString& gpu = mGLStrings->Renderer(); NS_LossyConvertUTF16toASCII model(mModel); - // Enable Webrender on all Adreno 3xx, 4xx, 5xx and 6xx GPUs + // Enable Webrender on all Adreno 3xx, 4xx, and 6xx GPUs isUnblocked |= gpu.Find("Adreno (TM) 3", /*ignoreCase*/ true) >= 0 || gpu.Find("Adreno (TM) 4", /*ignoreCase*/ true) >= 0 || - gpu.Find("Adreno (TM) 5", /*ignoreCase*/ true) >= 0 || gpu.Find("Adreno (TM) 6", /*ignoreCase*/ true) >= 0; + // Enable Webrender on all Adreno 5xx GPUs... + isUnblocked |= + gpu.Find("Adreno (TM) 5", /*ignoreCase*/ true) >= 0 && + // Excluding 505 and 506 on Android 9 due to crashes during + // shader compilation. See bug 1609191. + !((gpu.Find("Adreno (TM) 505", /*ignoreCase*/ true) >= 0 || + gpu.Find("Adreno (TM) 506", /*ignoreCase*/ true) >= 0) && + mSDKVersion == 28); + // Enable Webrender on all Mali-Txxx GPUs isUnblocked |= gpu.Find("Mali-T", /*ignoreCase*/ true) >= 0;