Bug 171235 - Painting errors in cube for three desktops
Summary: Painting errors in cube for three desktops
Alias: None
Product: kwin
Classification: Unclassified
Component: compositing (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
Depends on:
Reported: 2008-09-17 21:50 UTC by Stefan Majewsky
Modified: 2009-02-06 10:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:

Example of when the bug occurs (723.71 KB, image/png)
2008-09-18 10:23 UTC, Stefan Majewsky
Example of when the bug does not occur (601.38 KB, image/png)
2008-09-18 10:26 UTC, Stefan Majewsky

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Majewsky 2008-09-17 21:50:47 UTC
Version:            (using Devel)
Installed from:    Compiled sources

How to reproduce:
1. Set the number of virtual desktops to 3.
2. Toggle the desktop cube.
3. Move the desktop cube gently to the right (about 45 degrees).

3. In a special angle range, the second desktop is rendered too transparent.

Expected behavior:
3. The desktops in the front should always be rendered at the highest opacity.
Comment 1 Martin Flöser 2008-09-18 09:21:20 UTC
The opacity is never changed. All virtual desktops have the same opacity. I have at the moment no idea what could trigger this behaviour.

Are you able to make a screenshot of it? And are you using Intel, ATI or nVidia?
Comment 2 Stefan Majewsky 2008-09-18 10:23:52 UTC
Created attachment 27465 [details]
Example of when the bug occurs

This screenshot shows the bug (the right virtual desktop). Compare to the next attachment where the cube is turned a little step further.
Comment 3 Stefan Majewsky 2008-09-18 10:26:45 UTC
Created attachment 27466 [details]
Example of when the bug does not occur

In this screenshot, the error does not occur. Compare to the previous attachment where the error occurs.

My graphics accelerator is an Intel GMA X3100 chip.
Comment 4 Martin Flöser 2008-09-18 10:43:35 UTC
thanks for the screenshots. Just tested it on my system: it appears as well.

I was only able to reproduce with 3 virtual desktops. Probably the same for you? Seems like the logic in which sequence to paint the desktops does not work for three desktops :-(
Comment 5 Martin Flöser 2008-11-27 17:55:41 UTC
I worked on this bug today and found a solution with face culling (don't know why I didn't think of it before). But the current code has to be changed as a solution with face culling and current code is not very performant.

I will rewrite parts of the code for 4.3, to work well with face culling as this really cleans up the code. So this bug won't be fixed for 4.2 :-(
Comment 6 Stefan Majewsky 2008-11-27 22:07:53 UTC
Thanks for your investigations, Martin. I think most will be fine with this roadmap as 3 desktops is a quite unusual setup; for example, most distributions default to 2 or 4 desktops.
Comment 7 Martin Flöser 2008-12-15 15:26:32 UTC
As this won't be fixed for 4.2, I set to later. It will be fixed with some reworking for Cube in 4.3.
Comment 8 Martin Flöser 2009-02-06 10:16:31 UTC
SVN commit 922023 by graesslin:

Merge in the first changes from cube git branch (http://github.com/mgraesslin/kwin/tree/cube):
 * Code restructuring and clean-up
 * Use of glLists to store the rotation and painting of the cube. That way things are only calculated when something changed. Painting the cube is still required in each frame as it would break all other effects.
 * Use face culling to paint the cube in the correct sequence.
 * Move loading of all settings to cube effect. In preparation of getting rid of cylinder and sphere classes

Known regression: cylinder and sphere caps are partly broken.

BUG: 171235

 M  +181 -149  cube.cpp  
 M  +4 -2      cube.h  
 M  +3 -12     cylinder.cpp  
 M  +1 -2      cylinder.h  
 M  +1 -10     sphere.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=922023