Commit 1581ff03 by Yuly Novikov Committed by Commit Bot

Vulkan: disable VK_PRESENT_MODE_FIFO_KHR on Linux Intel

Causes random timeouts. Bug: angleproject:2932, angleproject:3153 Change-Id: I69a200684afab9e00642850bfa8e8efd0da5ad1d Reviewed-on: https://chromium-review.googlesource.com/c/1495229Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
parent ffa277a1
...@@ -14,6 +14,8 @@ namespace angle ...@@ -14,6 +14,8 @@ namespace angle
struct FeaturesVk struct FeaturesVk
{ {
FeaturesVk();
// Line segment rasterization must follow OpenGL rules. This means using an algorithm similar // Line segment rasterization must follow OpenGL rules. This means using an algorithm similar
// to Bresenham's. Vulkan uses a different algorithm. This feature enables the use of pixel // to Bresenham's. Vulkan uses a different algorithm. This feature enables the use of pixel
// shader patching to implement OpenGL basic line rasterization rules. This feature will // shader patching to implement OpenGL basic line rasterization rules. This feature will
...@@ -66,8 +68,12 @@ struct FeaturesVk ...@@ -66,8 +68,12 @@ struct FeaturesVk
// Whether the VkDevice supports the VK_ANDROID_external_memory_android_hardware_buffer // Whether the VkDevice supports the VK_ANDROID_external_memory_android_hardware_buffer
// extension, on which the EGL_ANDROID_image_native_buffer extension can be layered. // extension, on which the EGL_ANDROID_image_native_buffer extension can be layered.
bool supportsAndroidHardwareBuffer = false; bool supportsAndroidHardwareBuffer = false;
// VK_PRESENT_MODE_FIFO_KHR causes random timeouts on Linux Intel. http://anglebug.com/3153
bool disableFifoPresentMode = false;
}; };
inline FeaturesVk::FeaturesVk() = default;
} // namespace angle } // namespace angle
#endif // ANGLE_PLATFORM_FEATURESVK_H_ #endif // ANGLE_PLATFORM_FEATURESVK_H_
...@@ -1213,6 +1213,11 @@ void RendererVk::initFeatures(const ExtensionNameList &deviceExtensionNames) ...@@ -1213,6 +1213,11 @@ void RendererVk::initFeatures(const ExtensionNameList &deviceExtensionNames)
deviceExtensionNames) && deviceExtensionNames) &&
ExtensionFound(VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME, deviceExtensionNames); ExtensionFound(VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME, deviceExtensionNames);
#endif #endif
if (IsLinux() && IsIntel(mPhysicalDeviceProperties.vendorID))
{
mFeatures.disableFifoPresentMode = true;
}
} }
void RendererVk::initPipelineCacheVkKey() void RendererVk::initPipelineCacheVkKey()
......
...@@ -395,7 +395,7 @@ angle::Result WindowSurfaceVk::initializeImpl(DisplayVk *displayVk) ...@@ -395,7 +395,7 @@ angle::Result WindowSurfaceVk::initializeImpl(DisplayVk *displayVk)
// Select appropriate present mode based on vsync parameter. Default to 1 (FIFO), though it // Select appropriate present mode based on vsync parameter. Default to 1 (FIFO), though it
// will get clamped to the min/max values specified at display creation time. // will get clamped to the min/max values specified at display creation time.
setSwapInterval(1); setSwapInterval(renderer->getFeatures().disableFifoPresentMode ? 0 : 1);
// Default to identity transform. // Default to identity transform.
mPreTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; mPreTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
......
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