Commit 37c5d36f by Geoff Lang Committed by Angle LUCI CQ

GL: Use glClear for robust init on Android.

The allowClearForRobustResourceInit was used to work around driver bugs on other Windows and Linux and has a lot of CPU overhead. Re-enable it on Android (except some older Adreno). Bug: chromium:983167 Change-Id: Ibfb4eb4fcdc7310fb6181c57f5c8d7a645ffad9d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3011420Reviewed-by: 's avatarPeng Huang <penghuang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 396518e0
...@@ -112,6 +112,12 @@ int getMaliGNumber(const FunctionsGL *functions) ...@@ -112,6 +112,12 @@ int getMaliGNumber(const FunctionsGL *functions)
return number; return number;
} }
bool IsAdreno418(const FunctionsGL *functions)
{
int number = getAdrenoNumber(functions);
return number != 0 && getAdrenoNumber(functions) == 418;
}
bool IsAdreno42xOr3xx(const FunctionsGL *functions) bool IsAdreno42xOr3xx(const FunctionsGL *functions)
{ {
int number = getAdrenoNumber(functions); int number = getAdrenoNumber(functions);
...@@ -1981,7 +1987,8 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature ...@@ -1981,7 +1987,8 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature
IsAndroid() || (IsApple() && (isIntel || isAMD || isNvidia))); IsAndroid() || (IsApple() && (isIntel || isAMD || isNvidia)));
ANGLE_FEATURE_CONDITION(features, limitMax3dArrayTextureSizeTo1024, limitMaxTextureSize); ANGLE_FEATURE_CONDITION(features, limitMax3dArrayTextureSizeTo1024, limitMaxTextureSize);
ANGLE_FEATURE_CONDITION(features, allowClearForRobustResourceInit, IsApple()); ANGLE_FEATURE_CONDITION(features, allowClearForRobustResourceInit,
IsApple() || (IsAndroid() && !IsAdreno418(functions)));
// The WebGL conformance/uniforms/out-of-bounds-uniform-array-access test has been seen to fail // The WebGL conformance/uniforms/out-of-bounds-uniform-array-access test has been seen to fail
// on AMD and Android devices. // on AMD and Android devices.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment