[cairo] pixman 0.18 MinGW SSE2 error

Soeren Sandmann sandmann at daimi.au.dk
Wed Apr 7 13:15:25 PDT 2010


Hi,

> Actually that SEGV Sven reported is familiar to me, too, since last
> weekend. It is caused by the broken implementation of SSE2 intrinsics
> in MinGW. For some reason variables of type __m128i (and __m128d,
> presumably) don't get the 16-byte alignment they require. (I don't
> know whether the __m64* types get the 8-byte alignment they require or
> not.)

The stack trace showed that cairo was rasterizing trapezoids, which is
not done with component alpha, but sse2_composite_add_n_8888_8888_ca()
*is* using component alpha, so clearly the wrong fast path was
selected. This could be explained by the fast path cache containing
wrong information because of the incorrect handling of the thread
local storage, but it might also be something else.

Also, the line that it is crashing in:

        xmm_mask = load_128_unaligned ((__m128i*)pm);

shouldn't crash because of alignment. So something else must be going
on here.

> The only simple way to get "make check" to work in pixman was to use
> --disable-sse2 --disable-mmx. Which sucks, I guess. Presumably
> pixman's code has on Windows been developed and tested only using
> Microsoft's compiler.

It has mainly been written on Linux, but Mozilla at one point made it
work with MSVC.  I'm definitely interested in making sure SSE2 works
on Windows with MinGW and other GCC derivatives.


Thanks,
Soren


More information about the cairo mailing list