diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp index 0851567..85b1280 100644 --- a/src/steamcompmgr.cpp +++ b/src/steamcompmgr.cpp @@ -6483,6 +6483,12 @@ steamcompmgr_main(int argc, char **argv) const bool bVRR = drm_get_vrr_in_use( &g_DRM ); + // HACK: Disable tearing if we have an overlay to avoid stutters right now + // TODO: Fix properly. + static bool bHasOverlay = ( global_focus.overlayWindow && global_focus.overlayWindow->opacity ) || + ( global_focus.externalOverlayWindow && global_focus.externalOverlayWindow->opacity ) || + ( global_focus.overrideWindow && global_focus.focusWindow && !global_focus.focusWindow->isSteamStreamingClient && global_focus.overrideWindow->opacity ); + const bool bSteamOverlayOpen = global_focus.overlayWindow && global_focus.overlayWindow->opacity; // If we are running behind, allow tearing. const bool bSurfaceWantsAsync = (g_HeldCommits[HELD_COMMIT_BASE] && g_HeldCommits[HELD_COMMIT_BASE]->async); @@ -6493,7 +6499,7 @@ steamcompmgr_main(int argc, char **argv) // for composition to finish before submitting. // If we want to do async + composite, we should set up syncfile stuff and have DRM wait on it. const bool bNeedsSyncFlip = bForceSyncFlip || g_bCurrentlyCompositing || nIgnoredOverlayRepaints; - const bool bDoAsyncFlip = ( ((g_nAsyncFlipsEnabled >= 1) && g_bSupportsAsyncFlips && bSurfaceWantsAsync) || bVRR ) && !bSteamOverlayOpen && !bNeedsSyncFlip; + const bool bDoAsyncFlip = ( ((g_nAsyncFlipsEnabled >= 1) && g_bSupportsAsyncFlips && bSurfaceWantsAsync && !bHasOverlay) || bVRR ) && !bSteamOverlayOpen && !bNeedsSyncFlip; bool bShouldPaint = false; if ( bDoAsyncFlip )