Bug 3945 - Precision problems in fb/fbcompose.c and fb/fbpict.h
Summary: Precision problems in fb/fbcompose.c and fb/fbpict.h
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
Depends on:
Blocks: xorg-7.2
  Show dependency treegraph
Reported: 2005-08-02 05:22 UTC by Billy Biggs
Modified: 2006-06-29 05:17 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description Billy Biggs 2005-08-02 05:22:12 UTC
The transform code in fbcompose.c uses a C divide to convert from the current
transform coordinate to the source pixels.  This can cause problems.  For
example, when scaling a repeating texture, -0.5 maps to pixel 0 rather than the
pixel at width-1.

The attached patch addresses this issue.  I intend to commit it to the
xserver/fb code.
Comment 1 Billy Biggs 2005-08-02 05:22:39 UTC
Created attachment 3206 [details]
SVGscan log with details of the 130 xlink:href links in question
Comment 2 Billy Biggs 2005-08-11 11:58:00 UTC
Created attachment 3323 [details] [review]

Here is a patch I committed today to xserver/fb which fixes a rounding bug. 
Similar to the other patch on this bug, this fixes an error in the math which
is causing incorrect output.
Comment 3 Billy Biggs 2005-08-11 11:59:09 UTC
Created attachment 3324 [details] [review]
Patch to make xorg-server build on alpha

Here is yet another patch which fixes some incorrect output from the fb code. 
These can be split up into multiple bugs if necessary, but it's yet another
change in the same theme -- a precision error in the current fb code in xorg
which causes wrong pixels.
Comment 4 Billy Biggs 2005-08-24 16:17:41 UTC
Marking as blocking for the release, I'll resurrect my patches.
Comment 5 Billy Biggs 2005-08-28 20:42:55 UTC
The patches from bug 4269 and bug 4283 should also be applied to the xorg
equivalent code.
Comment 6 Adam Jackson 2005-10-03 12:54:06 UTC
ping.  any word on these patches?
Comment 7 Billy Biggs 2005-10-03 12:57:43 UTC
Sorry, i'll get on it asap.  So far we've had problems reproducing the issues with
the Xorg server even though I know it has these problems.  I just don't want
to commit the code blind.
Comment 8 Adam Jackson 2005-11-19 05:03:35 UTC
reping.  what's the status on this?
Comment 9 Adam Jackson 2005-12-10 03:50:04 UTC
Comment 10 Adam Jackson 2005-12-15 06:55:55 UTC
unclear that this fixes anything appreciable, so deferring this to 7.1
Comment 11 Adam Jackson 2006-04-25 05:41:34 UTC
enough precision bugs have been fixed in fb since pre-7 that i'm calling this
one fixed.  if there are others please open new bugs.
Comment 12 Adam Jackson 2006-04-25 07:58:24 UTC
reopening at anholt's suggestion; but unless a patch is forthcoming this isn't
going to block 7.1.
Comment 13 Adam Jackson 2006-05-16 23:31:27 UTC
(In reply to comment #12)
> reopening at anholt's suggestion; but unless a patch is forthcoming this isn't
> going to block 7.1.

patch is not forthcoming; moving out to 7.2.
Comment 14 Erik Andren 2006-05-31 01:28:36 UTC
I'm a bit confused. Is the original patch submitted into xorg and all is fine or
has additional precision problems been discovered that needs to be addressed? 
Comment 15 Eric Anholt 2006-06-29 05:17:00 UTC
Yes, confirmed that the patch here was committed to xorg
(8bfffb96b552a3facb77ff9e81658e80becbf2f4 is the commit, compare to
a029f3463684b5d1a0470a86da2d1d9157e1b9f4 in ~anholt/xserver).

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.