Bug 16917 - [i915] Blur on y-axis also when only x-axis is scaled billiear [centre sampling]
Summary: [i915] Blur on y-axis also when only x-axis is scaled billiear [centre sampling]
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-31 01:27 UTC by Clemens Eisserer
Modified: 2010-06-15 07:06 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
testcase (4.38 KB, text/plain)
2008-07-31 01:28 UTC, Clemens Eisserer
no flags Details
screenshot with 10x10 source (718 bytes, image/png)
2008-08-16 09:01 UTC, Clemens Eisserer
no flags Details
Nimbus theme, pixman composition (14.00 KB, image/png)
2008-10-20 05:15 UTC, Clemens Eisserer
no flags Details
Nimbus theme, intel composition (15.00 KB, image/png)
2008-10-20 05:16 UTC, Clemens Eisserer
no flags Details

Description Clemens Eisserer 2008-07-31 01:27:53 UTC
Running Xorg-1.4.99.902/Intel-2.3.2 I see blur on the y-axis also when
scaling on the x-axis only, when billinear filtering is used.
This does not happen using XAA/pixman, testcase attached.

I took screenshots of the problem (the first two pictures belong to a
different topic):
Should be: http://picasaweb.google.de/linuxhippy/Transformations/photo#5224020903104218962
Is: http://picasaweb.google.de/linuxhippy/Transformations/photo#5224017614970060162

The Line with RepeatPad falls back to pixman, thats why its rendered correctly.
Accoding to the mailing-list this bug does also happen with the latest version of the intel driver.
Comment 1 Clemens Eisserer 2008-07-31 01:28:24 UTC
Created attachment 18026 [details]
testcase
Comment 2 Michael Fu 2008-07-31 02:01:31 UTC
Clemens, thanks for filing a bug. would you please kindly follow the instructions at http://www.intellinuxgraphics.org/how_to_report_bug.html to provide us more information about your environment so that we can try to reproduce this bug? 

Seems a bug for Carl...
Comment 3 Clemens Eisserer 2008-07-31 03:47:35 UTC
Ok ... here it is:

Happends on Fedora 8, 9 and Rawhide with:
Toshiba Tecra A8, Intel-945GM, i386, XOrg-1.4.99.905, Linux-2.6.25
Comment 4 Carl Worth 2008-08-12 18:00:51 UTC
I was unable to replicate the bug with the testcase on an i965 machine.

I can try later with an i945 machine.

in the meantime, it looks like the issue is not with "blur on y-axis", but
probably more likely an issue with an off-by-one-half-pixel difference in
the sampling location used somewhere. We have had various bugs like this
in the X server and in pixman.

Clemens, if you're still seeing this bug, a useful tweak to the test case
would be to make the source something like 10x10 rather than 10x1. If the
bug is what I'm thinking, then that should make the difference in behavior
of the X and Y axes more apparent.

Thanks,

-Carl
Comment 5 Clemens Eisserer 2008-08-16 09:00:28 UTC
Hi Carl,

Thanks for looking into this. I attached the screenshot of the testcase with a 10x10 source pixmap, and a 5x scale on the x-axis.
This is with Intel-2.3.2, so maybe its already fixed.
Comment 6 Clemens Eisserer 2008-08-16 09:01:00 UTC
Created attachment 18320 [details]
screenshot with 10x10 source
Comment 7 Clemens Eisserer 2008-10-20 05:14:22 UTC
I can see this behaviour with xorg-git and at least for me its a serious show-stopper. Any updates on this?

I attach two screenshot who the nimbus-lnf looks on pixman and with intel-git on my 945GM.
Comment 8 Clemens Eisserer 2008-10-20 05:15:13 UTC
Created attachment 19758 [details]
Nimbus theme, pixman composition
Comment 9 Clemens Eisserer 2008-10-20 05:16:21 UTC
Created attachment 19759 [details]
Nimbus theme, intel composition
Comment 10 Clemens Eisserer 2008-10-23 08:17:45 UTC
Just tried the real-world use case on an i965 and it works perfectly, so it seems to be limited to i915 and maybe below.
Comment 11 Clemens Eisserer 2008-11-01 15:34:38 UTC
Also reproduceable on i830 (855GM) with git from 2008-10-30
Comment 12 Clemens Eisserer 2009-03-31 17:38:51 UTC
any chance to get this fixed anytime soon?
Comment 13 Clemens Eisserer 2009-07-06 15:50:09 UTC
The same bug has been fixed in the radeonhd driver, by commit: http://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd/commit/?id=645a0a0a6e5e57a4bb77c3b9c7d20b58d4c9ec28

Because the bug caused exactly the same artifact, I thought posting the link here could maybe help to find the issue easier.
Comment 14 Chris Wilson 2009-12-09 02:56:03 UTC
Reassigning to myself since I too feel this pain, just haven't found a way to fix this and not cause text regressions. :(
Comment 15 Clemens Eisserer 2010-05-25 02:58:09 UTC
the pain is still there :/
Comment 16 Clemens Eisserer 2010-05-25 02:59:02 UTC
Chris: Do you think it makes sence to add this test to rendercheck?
Comment 17 Chris Wilson 2010-05-25 03:10:26 UTC
It's covered by the cairo test suite, in particular xcomposite-projection. cairo has the advantage of using reference images and we would need to similarly teach rendercheck to compare against pixman [and add the appropriate tests to pixman itself!] as the simplest method to extend rendercheck for this style of testing. I am satisfied that I have test coverage [for this bug, but not the entirety of the RENDER spec], and that testing also shows that I have not found a way to fix centre sampling without breaking alpha sampling. That is still puzzling me.
Comment 18 Chris Wilson 2010-06-01 15:18:47 UTC
commit dc402334f4e9b0de624bc89cd77eae4ec7cf1708
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jun 1 23:03:19 2010 +0100

    i915: Centre sampling.
    
    Use centre sampling of textures to match pixman, and remove numerous
    off-by-one and visual artefacts when rendering. The classic example for
    this is cairo/text/xcomposite-projection where the edge of the rotated
    rectangle is jaggy due to the incorrect sample position.
    
    Fixes:
    
      Bug 16917  - [i915] Blur on y-axis also when only x-axis is scaled
                   billiear
      https://bugs.freedesktop.org/show_bug.cgi?id=16917
    
Finally! In the end it was a simple check in the code screwing up when the format was changed to include the sample bias and nothing to do with the GPU state at all.
Comment 19 Clemens Eisserer 2010-06-15 07:06:35 UTC
Thanks a lot Chris, just tested 2.11.901 and well ... its just wonderful.
I owe you a beer :)


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.