From e5294cafb11e735eaf5550c2b35fab593b834d46 Mon Sep 17 00:00:00 2001 From: Arne Scheffler Date: Sun, 28 Jan 2024 12:44:12 +0100 Subject: [PATCH] Windows DirectComposition: fix UI flickering with some GPU cards/drivers --- vstgui/lib/platform/win32/win32directcomposition.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vstgui/lib/platform/win32/win32directcomposition.cpp b/vstgui/lib/platform/win32/win32directcomposition.cpp index cef864410..8567c8257 100644 --- a/vstgui/lib/platform/win32/win32directcomposition.cpp +++ b/vstgui/lib/platform/win32/win32directcomposition.cpp @@ -678,6 +678,8 @@ bool Factory::Impl::createD3D11Device () D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1}; UINT creationFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT; + // fix UI flickering with some GPU cards/drivers + creationFlags |= D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS; #if DEBUG creationFlags |= D3D11_CREATE_DEVICE_DEBUG; #endif