Commit 91ea27ae by Kenneth Russell Committed by Commit Bot

Apply limitMaxMSAASamplesTo4 workaround to macOS.

On dual-GPU MacBook Pros, the maximum number of supported samples can differ between the integrated and discrete GPUs, leading to unexpected OpenGL errors in applications. Detected with WebGL conformance tests in Safari with ANGLE as the WebGL backend. Bug: angleproject:4518 Change-Id: I54997cbb83afd76d98b16d138d117d0afdeec5e1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2125407Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
parent 06f4f3e1
......@@ -1621,7 +1621,10 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature
bool limitMaxTextureSize = isIntel && IsLinux() && GetLinuxOSVersion() < OSVersion(5, 0, 0);
ANGLE_FEATURE_CONDITION(features, limitMaxTextureSizeTo4096,
IsAndroid() || limitMaxTextureSize);
ANGLE_FEATURE_CONDITION(features, limitMaxMSAASamplesTo4, IsAndroid());
// On Apple switchable graphics, GL_MAX_SAMPLES may differ between the GPUs.
// 4 is a lowest common denominator that is always supported.
ANGLE_FEATURE_CONDITION(features, limitMaxMSAASamplesTo4,
IsAndroid() || (IsApple() && (isIntel || isAMD || isNvidia)));
ANGLE_FEATURE_CONDITION(features, limitMax3dArrayTextureSizeTo1024, limitMaxTextureSize);
ANGLE_FEATURE_CONDITION(features, allowClearForRobustResourceInit, IsApple());
......
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