Commit 512abe85 by James Darpinian Committed by Commit Bot

Clamp array accesses when robust buffer access not available

Apple doesn't support GL_KHR_robust_buffer_access_behavior, so we don't know if we can trust the driver to be safe with out of bounds array accesses. It's not currently failing the out of bounds access tests, but this may be coincidental. In general it makes sense to always clamp array accesses when GL_KHR_robust_buffer_access_behavior is not supported. The validating command decoder actually enables this workaround unconditionally, but that seems unnecessary. Bug: angleproject:2978 Change-Id: Ib061dd4db10e044ced0dff95d0aac6a91f15b100 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2018182Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
parent 0a3f58f1
......@@ -1599,7 +1599,9 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature
// The WebGL conformance/uniforms/out-of-bounds-uniform-array-access test has been seen to fail
// on AMD and Android devices.
ANGLE_FEATURE_CONDITION(features, clampArrayAccess, IsAndroid() || isAMD);
ANGLE_FEATURE_CONDITION(
features, clampArrayAccess,
IsAndroid() || isAMD || !functions->hasExtension("GL_KHR_robust_buffer_access_behavior"));
ANGLE_FEATURE_CONDITION(features, resetTexImage2DBaseLevel,
IsApple() && isIntel && GetMacOSVersion() >= OSVersion(10, 12, 4));
......
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