Bug 95091 - Pixelated shadow in Compiz
Summary: Pixelated shadow in Compiz
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-23 17:18 UTC by Gianluca Pettinello
Modified: 2016-04-24 08:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Screenshots of the pixelated shadow (2.35 MB, image/png)
2016-04-23 17:21 UTC, Gianluca Pettinello
no flags Details

Description Gianluca Pettinello 2016-04-23 17:18:08 UTC
OS Archlinux
DE xfce
WM compiz
Driver intel 2.99.917.639.gcac8e1e
Accel method sna
Shadow in Compiz are pixelated especially on the left and righ sides.
If I use uxa the problem goes away, but using uxa slows down significantly the system
Looking at internet it seems related to cairo library.
Please could you help?

Thanks
Gianluca
Comment 1 Gianluca Pettinello 2016-04-23 17:21:07 UTC
Created attachment 123189 [details]
Screenshots of the pixelated shadow
Comment 2 Chris Wilson 2016-04-23 18:09:38 UTC
Limited precision bug. What hardware? Please attach your Xorg.0.log.
Comment 3 Chris Wilson 2016-04-23 18:32:33 UTC
Hmm. Actually it may be that the second pass is being clipped unexpectedly so the horizontal outside areas are not being smoothed.
Comment 4 Chris Wilson 2016-04-23 21:47:44 UTC
A little bit of investigation, and the issue is the quantization artefacts.
Comment 5 Chris Wilson 2016-04-23 22:04:25 UTC
I put a cap in so that the shadow doesn't become too pixellated:

commit bca4e0e35e4ac27f2dcd1a8e5fcbf7ce69cec358
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Apr 23 21:42:12 2016 +0100

    sna: Limit generic convolution to smallish kernels
    
    Since the naive implementation uses an 8bit temporary, we can only
    support so many passes before the quantization artefacts become
    apparent. We have to be extra conservation in order to support
    multi-pass convolution algorithms (notable 2-pass separable Gaussian
    kernels).
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=95091
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

It's a tradeoff that hopefully should allow small drop shadows (~15 pixels) to be naively acceleration without looking atrocious.

It would be possible to fully support convolution kernels on recent hardware, might be an interesting challenge.
Comment 6 Gianluca Pettinello 2016-04-24 08:19:17 UTC
Hi Chris,
I recompiled and tested: works like a charm!
You are really a master.

It is a teaching lesson for me of how nice is the concept of free open source community: there is always somebody there to help you and you on your turn can help somebody.

I will cascade to compiz community

Thanks again
Gianluca


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.