diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-09-28 15:13:08 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-09-29 09:58:16 +0200 |
commit | 614d310751d1a32baec85c11637fb3813a9dd749 (patch) | |
tree | b81ee0366291b7fe0412cf9b841abd7030685ecb /vcl | |
parent | f8d6eb6f171dbcf7e3aa4afa0da32bd504f473dc (diff) |
disable VSync for Skia/Vulkan on Linux/nVidia
It causes freezes. This can be changed later to a blacklist of older
drivers once fixed drivers are actually available.
Change-Id: I6cc996aee2ae69d5c8fdd9eb5f9f336683350485
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103554
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/skia/utils.hxx | 2 | ||||
-rw-r--r-- | vcl/skia/x11/gdiimpl.cxx | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx index ed9ae0eaf100..222a413b511e 100644 --- a/vcl/inc/skia/utils.hxx +++ b/vcl/inc/skia/utils.hxx @@ -70,7 +70,7 @@ VCL_DLLPUBLIC void dump(const sk_sp<SkImage>& image, const char* file); VCL_DLLPUBLIC void dump(const sk_sp<SkSurface>& surface, const char* file); #endif -extern uint32_t vendorId; +VCL_DLLPUBLIC extern uint32_t vendorId; inline DriverBlocklist::DeviceVendor getVendor() { diff --git a/vcl/skia/x11/gdiimpl.cxx b/vcl/skia/x11/gdiimpl.cxx index 7a55415ee55a..68571ccb73e7 100644 --- a/vcl/skia/x11/gdiimpl.cxx +++ b/vcl/skia/x11/gdiimpl.cxx @@ -57,6 +57,13 @@ X11SkiaSalGraphicsImpl::createWindowContext(Display* display, Drawable drawable, SkiaZone zone; sk_app::DisplayParams displayParams; displayParams.fColorType = kN32_SkColorType; +#if defined LINUX + // WORKAROUND: VSync causes freezes that can even temporarily freeze the entire desktop. + // This happens even with the latest 450.66 drivers despite them claiming a fix for vsync. + // https://forums.developer.nvidia.com/t/hangs-freezes-when-vulkan-v-sync-vk-present-mode-fifo-khr-is-enabled/67751 + if (SkiaHelper::getVendor() == DriverBlocklist::VendorNVIDIA) + displayParams.fDisableVsync = true; +#endif sk_app::window_context_factory::XlibWindowInfo winInfo; assert(display); winInfo.fDisplay = display; |