Bug 336589 - Choppy fullscreen using OpenGL with compositor with latest xf86-video-intel
Summary: Choppy fullscreen using OpenGL with compositor with latest xf86-video-intel
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://git.reviewboard.kde.org/r/118...
Keywords:
: 338434 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-22 17:52 UTC by valdikss
Modified: 2014-08-22 11:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description valdikss 2014-06-22 17:52:14 UTC
In the latest xf86-video-intel release, the developers made some changes to TearFree which lead to choppy fullscreen OpenGL with KWin in compositing mode.

I filled a bug for xf86-video-intel and they say it's KWin issue:
https://bugs.freedesktop.org/show_bug.cgi?id=80349

After applying this patch to KWin, everything is smooth again.

Reproducible: Always

Steps to Reproduce:
1. Install xf86-video-intel 2.99.912
2. Download http://rghost.ru/56512098. This is 60 fps video
3. mplayer -vo gl output.mp4 or mpv --vo opengl output.mp4
4. Watch video in windowed mode. It should play very smooth
5. Run mplayer/mpv again. Press "f" to go fullscreen
Actual Results:  
Video in fullscreen is as smooth as in windowed mode

Expected Results:  
Video is choppy
Comment 1 Martin Flöser 2014-06-22 18:49:16 UTC
From the bug report:

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;

--------
I'll run this tomorrow on my Intel system
Comment 2 valdikss 2014-06-22 18:51:32 UTC
Messed up actual result / expected result, should be vice versa.
Comment 3 Martin Flöser 2014-06-24 07:31:42 UTC
Git commit e8241313fc979aefafc8c2a0207570d6394f1580 by Martin Gräßlin.
Committed on 23/06/2014 at 05:45.
Pushed by graesslin into branch 'master'.

[libkwineffects] Require strict binding for intel driver

According to driver devs it's a "buggy micro-optimisation", see
https://bugs.freedesktop.org/show_bug.cgi?id=80349#c1
REVIEW: 118893

M  +2    -1    libkwineffects/kwinglplatform.cpp

http://commits.kde.org/kwin/e8241313fc979aefafc8c2a0207570d6394f1580
Comment 4 Kevin Kofler 2014-07-06 00:00:54 UTC
Here's an unfuzzed patch against kde-workspace-4.11.10:
http://pkgs.fedoraproject.org/cgit/kde-workspace.git/tree/kde-workspace-4.11.10-kwin-intel-kde%23336589.patch

(We need this in Fedora Rawhide, where we now have the new intel driver.)
Comment 5 valdikss 2014-07-06 06:13:03 UTC
It's included in ArchLinux, btw.
Comment 6 Thomas Lübking 2014-08-21 17:11:22 UTC
*** Bug 338434 has been marked as a duplicate of this bug. ***
Comment 7 Martin Flöser 2014-08-22 05:41:20 UTC
Git commit 04157f13de8d9b3028bca3a1832276ba96ae45fd by Martin Gräßlin.
Committed on 22/08/2014 at 05:37.
Pushed by graesslin into branch 'KDE/4.11'.

[libkwineffects] Require strict binding for intel driver

According to driver devs it's a "buggy micro-optimisation", see
https://bugs.freedesktop.org/show_bug.cgi?id=80349#c1

Backport from kwin.git e8241313fc979aefafc8c2a0207570d6394f1580

M  +2    -1    kwin/libkwineffects/kwinglplatform.cpp

http://commits.kde.org/kde-workspace/04157f13de8d9b3028bca3a1832276ba96ae45fd
Comment 8 Thomas Lübking 2014-08-22 11:14:01 UTC
*** Bug 338472 has been marked as a duplicate of this bug. ***