Bug 16310 - x11-libs/pixman-0.11.4: fonts rendered are really really hardly legible
Summary: x11-libs/pixman-0.11.4: fonts rendered are really really hardly legible
Status: RESOLVED FIXED
Alias: None
Product: pixman
Classification: Unclassified
Component: pixman (show other bugs)
Version: 0.1.3
Hardware: Other All
: medium normal
Assignee: Søren Sandmann Pedersen
QA Contact: Søren Sandmann Pedersen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-11 13:19 UTC by Martin Mokrejs
Modified: 2008-07-18 11:45 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
/var/log/Xorg.0.log (41.96 KB, text/plain)
2008-06-11 13:33 UTC, Martin Mokrejs
Details
Only fixed in git (1.88 KB, patch)
2008-07-11 12:27 UTC, Stefan Dirsch
Details | Splinter Review

Description Martin Mokrejs 2008-06-11 13:19:52 UTC
Hi,
  I am a Gentoo user bug was asked to report here. However, the original bug report is here: http://bugs.gentoo.org/show_bug.cgi?id=225843

I have upgraded to recent pixman and my fonts rendered in xdm login window, but
later on also in opera, seamonkey were not readable. Luckily, not affected were
fonts in xterm. I have recompiled freetype, cairo but no luck. In the end I can
conclude that the cause is upgrade to pixman-0.11.4. emerge.log does not record
(I believe anymore) the previous version being unmerged. Stepping back to
0.10.0 fixes the bug and recompilation of 0.11.4 re-introduces it again.

I tested gcc-4.2.4 and 4.3.1, the bug appears with pixman lib produced by both.

I have the following CPU:

$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz
stepping        : 7
cpu MHz         : 1200.000
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts sync_rdtsc
bogomips        : 2401.27
clflush size    : 64


And from the compile message I pick some which might be related to identify the
cause:

>>> Emerging (1 of 1) x11-libs/pixman-0.11.4 to /
 * pixman-0.11.4.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                       
                                                    [ ok ]
 * checking ebuild checksums ;-) ...                                           
                                                    [ ok ]
 * checking auxfile checksums ;-) ...                                          
                                                    [ ok ]
 * checking miscfile checksums ;-) ...                                         
                                                    [ ok ]
 * checking pixman-0.11.4.tar.bz2 ;-) ...                                      
                                                    [ ok ]
>>> Unpacking source...
>>> Unpacking pixman-0.11.4.tar.bz2 to /var/tmp/portage/x11-libs/pixman-0.11.4/work
 * Running elibtoolize in: pixman-0.11.4
 *   Applying portage-1.5.10.patch ...
 *   Applying sed-1.5.6.patch ...
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/x11-libs/pixman-0.11.4/work/pixman-0.11.4 ...
 * econf: updating pixman-0.11.4/config.guess with
/usr/share/gnuconfig/config.guess
 * econf: updating pixman-0.11.4/config.sub with
/usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --prefix=/usr --datadir=/usr/share
--build=i686-pc-linux-gnu
...
checking whether to use MMX intrinsics... yes
checking whether to use SSE intrinsics... no
checking whether to use SSE2 intrinsics... yes
checking whether to use VMX/Altivec intrinsics... no
...
make[2]: Entering directory
`/var/tmp/portage/x11-libs/pixman-0.11.4/work/pixman-0.11.4/pixman'
/bin/sh ../libtool --tag=CC   --mode=compile i686-pc-linux-gnu-gcc
-DHAVE_CONFIG_H -I. -I..    -DPIXMAN_DISABLE_DEPRECATED -O2 -march=pentium4
-mmmx -msse -msse2 -fomit-frame-pointer -pipe -Wall -fvisibility=hidden -MT
libpixman_1_la-pixman-access.lo -MD -MP -MF
.deps/libpixman_1_la-pixman-access.Tpo -c -o libpixman_1_la-pixman-access.lo
`test -f 'pixman-access.c' || echo './'`pixman-access.c
mkdir .libs
...

Both pixman libs configure scripts decide to use only MMX and SSE2, not SSE.
Maybe that is not a bug with configure at all, a just thought. Definitely, my
system does support these cpu flags. I did not have a look but hope the ebuild
would filter out -msse3 CFLAGS if I would have had one in /etc/make.conf.
Comment 1 Martin Mokrejs 2008-06-11 13:33:09 UTC
Created attachment 17057 [details]
/var/log/Xorg.0.log
Comment 2 Søren Sandmann Pedersen 2008-06-13 12:14:49 UTC
Screen shot from the gentoo bug:

http://bugs.gentoo.org/attachment.cgi?id=156359&action=view
Comment 3 Søren Sandmann Pedersen 2008-06-13 12:52:42 UTC
And this is on r5g6b5:

   (II) RADEON(0): Pixel depth = 16 bits stored in 2 bytes (16 bpp pixmaps)
   (==) RADEON(0): RGB weight 565

So very likely this is a bug in the SSE2 code operating on r5g6b5.
Comment 4 Søren Sandmann Pedersen 2008-06-26 09:22:45 UTC
In pixman-0.11.6, the sse2 fast path code can be disabled at configure time:

   configure --disable-sse2

If someone could test and see if this makes the bug go away, that would be interesting.

Also interesting would be to know whether the bug depends on font rendering configuration, in particular whether it happens when the font is set to something other than subpixel antialiasing.
Comment 5 Søren Sandmann Pedersen 2008-07-09 06:47:12 UTC
Fixed in master
Comment 6 Martin Mokrejs 2008-07-11 11:22:18 UTC
Would you please post the patch or a hint where to get it? And in what version (if already released or the next release number) is that fixed? Thanks.
Comment 7 Stefan Dirsch 2008-07-11 12:27:05 UTC
Created attachment 17640 [details] [review]
Only fixed in git
Comment 8 Martin Mokrejs 2008-07-18 08:42:15 UTC
>>> Emerging (1 of 1) x11-libs/pixman-0.11.8 to /
>>> Downloading 'http://gentoo.mirror.web4u.cz/distfiles/pixman-0.11.8.tar.bz2'
--2008-07-18 17:23:31-- 
http://gentoo.mirror.web4u.cz/distfiles/pixman-0.11.8.tar.bz2
Resolving gentoo.mirror.web4u.cz... 81.91.81.13
Connecting to gentoo.mirror.web4u.cz|81.91.81.13|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 360229 (352K) [application/x-bzip]
Saving to: `/usr/portage/distfiles/pixman-0.11.8.tar.bz2'

100%[============================================================================================================================================================================================>]
360,229      555K/s   in 0.6s    

2008-07-18 17:23:32 (555 KB/s) - `/usr/portage/distfiles/pixman-0.11.8.tar.bz2'
saved [360229/360229]

 * pixman-0.11.8.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                       
                                                                               
                                                                [ ok ]
 * checking ebuild checksums ;-) ...                                           
                                                                               
                                                                [ ok ]
 * checking auxfile checksums ;-) ...                                          
                                                                               
                                                                [ ok ]
 * checking miscfile checksums ;-) ...                                         
                                                                               
                                                                [ ok ]
 * checking pixman-0.11.8.tar.bz2 ;-) ...                                      
                                                                               
                                                                [ ok ]
>>> Unpacking source...
>>> Unpacking pixman-0.11.8.tar.bz2 to /var/tmp/portage/x11-libs/pixman-0.11.8/work
 * Running elibtoolize in: pixman-0.11.8
 *   Applying portage-1.5.10.patch ...
 *   Applying sed-1.5.6.patch ...
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/x11-libs/pixman-0.11.8/work/pixman-0.11.8 ...
 * econf: updating pixman-0.11.8/config.guess with
/usr/share/gnuconfig/config.guess
 * econf: updating pixman-0.11.8/config.sub with
/usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --prefix=/usr --datadir=/usr/share --disable-vmx
--enable-mmx --enable-sse2 --disable-gtk --build=i686-pc-linux-gnu
...
checking whether to use MMX intrinsics... yes
checking whether to use SSE intrinsics... no
checking whether to use SSE2 intrinsics... yes
configure: error: SSE2 intrinsics not detected

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/x11-libs/pixman-0.11.8/work/pixman-0.11.8/config.log
 * 
 * ERROR: x11-libs/pixman-0.11.8 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2946:  Called x-modular_src_compile
 *             environment, line 3730:  Called x-modular_src_configure
 *             environment, line 3739:  Called econf '--prefix=/usr'
'--datadir=/usr/share' '--disable-vmx' '--enable-mmx' '--enable-sse2'
'--disable-gtk'
 *               ebuild.sh, line  526:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *  The die message:
 *   econf failed
 * 
 * If you need support, post the topmost build error, and the call stack if
relevant.
 * A complete build log is located at
'/var/tmp/portage/x11-libs/pixman-0.11.8/temp/build.log'.



config.log says:
configure:19913: checking whether to use SSE intrinsics
configure:19940: i686-pc-linux-gnu-gcc -c -O2 -march=pentium4 -mmmx -msse
-msse2 -fomit-frame-pointer -pipe -Wall -fvisibility=hidden -msse -mmmx
-Winline --param inline-unit-growth=10000 --param large-function-growth=10000 
conft
est.c >&5
conftest.c:6:2: error: #error "Need x86-64 for SSE"
configure:19946: $? = 1
configure: failed program was:
| 
| #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ <
4))
| #error "Need GCC >= 3.4 for SSE intrinsics"
| #endif
| #if !defined(__amd64__) && !defined(__x86_64__)
| #error "Need x86-64 for SSE"
| #endif
| #include <mmintrin.h>
| #include <xmmintrin.h>
| int main () {
|     __m64 v = _mm_cvtsi32_si64 (1);
|     v = _mm_shuffle_pi16 (v, _MM_SHUFFLE(3, 3, 3, 3));
|     return _mm_cvtsi64_si32 (v);
| }
configure:19961: result: no
configure:19991: checking whether to use SSE2 intrinsics
configure:20016: i686-pc-linux-gnu-gcc -c -O2 -march=pentium4 -mmmx -msse
-msse2 -fomit-frame-pointer -pipe -Wall -fvisibility=hidden -msse2 -mmmx -msse2
-Winline --param inline-unit-growth=10000 --param large-function-growth=1000
0 --param  max-inline-insns-single=6000  conftest.c >&5
conftest.c: In function 'main':
conftest.c:10: warning: 'a' is used uninitialized in this function
conftest.c:10: warning: 'b' is used uninitialized in this function
configure:20022: $? = 0
configure:20058: result: yes
configure:20061: error: SSE2 intrinsics not detected
Comment 9 Martin Mokrejs 2008-07-18 08:42:55 UTC
# gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.3.1-r1/work/gcc-4.3.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.3.1 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.1/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.1 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.1/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.1/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-cld --enable-java-awt=gtk --with-arch=i686 --enable-languages=c,c++,java,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.1-r1 p1.1'
Thread model: posix
gcc version 4.3.1 (Gentoo 4.3.1-r1 p1.1) 
#
Comment 10 Søren Sandmann Pedersen 2008-07-18 11:37:29 UTC
If there is a problem with pixman's configure files, please file a new bug with specific information.
Comment 11 Søren Sandmann Pedersen 2008-07-18 11:45:40 UTC
Actually, don't bother.

diff --git a/configure.ac b/configure.ac
index 05e66ae..6dcffb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -250,7 +250,7 @@ if test $have_sse2_intrinsics = yes ; then
 fi
 
 AC_MSG_RESULT($have_sse2_intrinsics)
-if test $enable_sse2 = yes && test $have_sse_intrinsics = no ; then
+if test $enable_sse2 = yes && test $have_sse2_intrinsics = no ; then
    AC_MSG_ERROR([SSE2 intrinsics not detected])
 fi
 


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.