Bug 440940 - Grid effect seems broken on kwin wayland master
Summary: Grid effect seems broken on kwin wayland master
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-desktop-grid (show other bugs)
Version: 5.22.90
Platform: Other Other
: VHI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 442554 442840 443246 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-08-13 17:53 UTC by Alexandre Pereira
Modified: 2021-10-03 22:38 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23


Attachments
screenshot of the grid effect (3.10 MB, image/png)
2021-08-13 17:53 UTC, Alexandre Pereira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Pereira 2021-08-13 17:53:51 UTC
Created attachment 140696 [details]
screenshot of the grid effect

SUMMARY
On kwin master (13/08/2021), it seems the kwin grid effect is broken.
I have 2 monitors with 4 virtual desktops. It is configured to display with 2 rows.

The result is as shown in the screenshot: It seems a portion of the right side is missing.



STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 David Edmundson 2021-08-16 11:28:02 UTC
Can you confirm with master as of today? There is one change that's quite relevant with regards to transforms
Comment 2 Alexandre Pereira 2021-08-16 13:43:12 UTC
(In reply to David Edmundson from comment #1)
> Can you confirm with master as of today? There is one change that's quite
> relevant with regards to transforms

yes, I just recompiled and it still has this issue.

btw, I tried on another distro that has kwin stable version, and I think i understand "what is cut": the "stable version of kwin" overlaps part of the left monitor into the right monitor while doing the animation.

At least in this git master version, it doesn't overlap monitors while in the animation ( not as much as "stable kwin" does, it still does a little in VD's 2 and 4 ( in a 4 VD alightment like in the screenshot ).
Comment 3 Zamundaaa 2021-09-17 08:36:56 UTC
Can confirm, on a single monitor setup. Looks like exactly the same clipping, too.
Comment 4 Vlad Zahorodnii 2021-09-17 10:12:42 UTC
*** Bug 442554 has been marked as a duplicate of this bug. ***
Comment 5 Vlad Zahorodnii 2021-09-23 14:13:42 UTC
*** Bug 442840 has been marked as a duplicate of this bug. ***
Comment 6 Bug Janitor Service 2021-09-23 14:16:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1458
Comment 7 Vlad Zahorodnii 2021-09-27 06:53:11 UTC
Git commit 0f6aa1c4a8c4a2d2b002bd2806ddb606e3d516ef by Vlad Zahorodnii.
Committed on 27/09/2021 at 06:52.
Pushed by vladz into branch 'master'.

scenes/opengl: Fix clipping with transformed screens

Software-based clipping is naive. It maps the clip region from the
global screen coordinates and intersects it with window quads. If the
window is transformed, the quads won't be clipped as expected.

Unfortunately, the OpenGL scene enables software-based geometry clipping
if the screen transformed. It's not clear why it does so, perhaps as a
performance optimization? Either way, this produces incorrect results
when the screen is scaled.

M  +1    -1    src/plugins/scenes/opengl/scene_opengl.cpp

https://invent.kde.org/plasma/kwin/commit/0f6aa1c4a8c4a2d2b002bd2806ddb606e3d516ef
Comment 8 Vlad Zahorodnii 2021-09-27 06:53:42 UTC
Git commit 41d2ee149f3334db7596a8449c793ed8980927f1 by Vlad Zahorodnii.
Committed on 27/09/2021 at 06:53.
Pushed by vladz into branch 'Plasma/5.23'.

scenes/opengl: Fix clipping with transformed screens

Software-based clipping is naive. It maps the clip region from the
global screen coordinates and intersects it with window quads. If the
window is transformed, the quads won't be clipped as expected.

Unfortunately, the OpenGL scene enables software-based geometry clipping
if the screen transformed. It's not clear why it does so, perhaps as a
performance optimization? Either way, this produces incorrect results
when the screen is scaled.


(cherry picked from commit 0f6aa1c4a8c4a2d2b002bd2806ddb606e3d516ef)

M  +1    -1    src/plugins/scenes/opengl/scene_opengl.cpp

https://invent.kde.org/plasma/kwin/commit/41d2ee149f3334db7596a8449c793ed8980927f1
Comment 9 Alexandre Pereira 2021-09-27 11:16:58 UTC
Just tested :)

Thank you so much vlad, not only is it working (no clipping), but now the animation is perfect on multi monitor setup!!!

I have 2x2 VD setup on 2 monitors, and everything animates smoothly without going into another monitor!!

Thank you !!!!!!!!
Comment 10 Patrick Silva 2021-10-03 22:38:17 UTC
*** Bug 443246 has been marked as a duplicate of this bug. ***