Bug 80349

Summary: [Regression][Bisected] Choppy fullscreen using OpenGL with compositor
Product: xorg Reporter: ValdikSS <iam>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED NOTOURBUG QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: luiorpe1
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description ValdikSS 2014-06-22 09:14:09 UTC
OpenGL in fullscreen is choppy since:

commit 8369166349c92a20d9a2e7d0256e63f66fe2682b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 4 08:29:51 2014 +0100

    sna/dri2: Enable immediate buffer exchanges
    
    The primary benefit of this is avoid the extra blit when using a
    compositor and instead propagate the compositor flip on the frontbuffer
    to the scanout, or equivalently allows a fullscreen game to flip onto
    the scanout without intervention by TearFree.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

How to reproduce:
1. Download http://rghost.ru/56512098. This is 60 fps video
2. mplayer -vo gl output.mp4 or mpv --vo opengl output.mp4
3. Watch video in windowed mode. It should play very smooth
4. Run mplayer/mpv again. Press "f" to go fullscreen

Expected result:
Video in fullscreen is as smooth as in windowed mode

Actual result:
Video is choppy

Additional information:
I'm running ArchLinux with latest KDE and KWin. It happens only with compositing on and does not have any correlation with vsync. I'm not using TearFree driver option.
Comment 1 Chris Wilson 2014-06-22 10:00:18 UTC
Kwin makes a buggy micro-optimisation:

diff --git a/kwin/libkwineffects/kwinglplatform.cpp b/kwin/libkwineffects/kwinglplatform.cpp
index ae2f459..c41b9df 100644
--- a/kwin/libkwineffects/kwinglplatform.cpp
+++ b/kwin/libkwineffects/kwinglplatform.cpp
@@ -808,7 +808,6 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
             m_supportsGLSL = false;
 
         m_limitedGLSL = m_supportsGLSL && m_chipClass < I965;
-        m_looseBinding = true;
 
         if (m_chipClass < I915) {
             m_recommendedCompositor = XRenderCompositing;
Comment 2 ValdikSS 2014-06-22 17:53:48 UTC
(In reply to comment #1)

Thanks! Filled bug to KDE bugtracker
https://bugs.kde.org/show_bug.cgi?id=336589
Comment 3 Chris Wilson 2014-06-23 22:04:22 UTC
*** Bug 80428 has been marked as a duplicate of this bug. ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.