Commit 135385a1 by Nicolas Capens Committed by Commit Bot

Disable EGL_EXT_buffer_age for SwiftShader Vulkan

Cuttlefish with SwANGLE failed to pass the android.graphics.cts. BitmapTest#testDrawingHardwareBitmapNotLeaking test, due to a timeout in dequeueBuffer (error = -110) during an EGL_BUFFER_AGE_EXT surface query. This change conservatively works around the issue by leaving EGL_EXT_buffer_age support disabled for SwiftShader. Further investigation is required to check whether this timeout can also occur with other Vulkan drivers, and if it can be addressed robustly. Bug: b/182521420 Bug: angleproject:3529 Change-Id: I54e3767e74bf922f273d8860f9f4cfc8b6589536 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2774030Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Nicolas Capens <nicolascapens@google.com>
parent d5bc8a27
......@@ -481,6 +481,14 @@ struct FeaturesVk : FeatureSetBase
Feature supportsNegativeViewport = {
"supportsNegativeViewport", FeatureCategory::VulkanFeatures,
"The driver supports inverting the viewport with a negative height.", &members};
// The EGL_EXT_buffer_age implementation causes
// android.graphics.cts.BitmapTest#testDrawingHardwareBitmapNotLeaking to fail on Cuttlefish
// with SwANGLE. Needs investigation whether this is a race condition which could affect other
// Vulkan drivers, or if it's a SwiftShader bug.
// http://anglebug.com/3529
Feature enableBufferAge = {"enableBufferAge", FeatureCategory::VulkanWorkarounds,
"Expose EGL_EXT_buffer_age", &members, "http://anglebug.com/3529"};
};
inline FeaturesVk::FeaturesVk() = default;
......
......@@ -246,7 +246,7 @@ void DisplayVk::generateExtensions(egl::DisplayExtensions *outExtensions) const
outExtensions->swapWithFrameToken = getRenderer()->getFeatures().supportsGGPFrameToken.enabled;
#endif // defined(ANGLE_PLATFORM_GGP)
outExtensions->bufferAgeEXT = true;
outExtensions->bufferAgeEXT = getRenderer()->getFeatures().enableBufferAge.enabled;
}
void DisplayVk::generateCaps(egl::Caps *outCaps) const
......
......@@ -2165,6 +2165,13 @@ void RendererVk::initFeatures(DisplayVk *displayVk,
ANGLE_FEATURE_CONDITION(&mFeatures, exposeNonConformantExtensionsAndVersions,
kExposeNonConformantExtensionsAndVersions);
// The EGL_EXT_buffer_age implementation causes
// android.graphics.cts.BitmapTest#testDrawingHardwareBitmapNotLeaking to fail on Cuttlefish
// with SwANGLE. Needs investigation whether this is a race condition which could affect other
// Vulkan drivers, or if it's a SwiftShader bug.
// http://anglebug.com/3529
ANGLE_FEATURE_CONDITION(&mFeatures, enableBufferAge, !isSwiftShader);
angle::PlatformMethods *platform = ANGLEPlatformCurrent();
platform->overrideFeaturesVk(platform, &mFeatures);
......
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