Commit Graph

2505 Commits

Author SHA1 Message Date
Cyril Brulebois
b16d4c7ed7 Upload to unstable 2014-08-18 22:52:38 +02:00
Julien Cristau
f9c2d54a62 Disable vmx on ppc64el (closes: #745547).
Thanks, Breno Leitao!
2014-07-24 22:43:15 +02:00
Julien Cristau
cd23302b1a Upload to unstable 2014-07-13 16:31:09 +02:00
Julien Cristau
98eadfa08b Remove Cyril from Uploaders. 2014-07-13 16:31:02 +02:00
Julien Cristau
9e8362a51f Bump debhelper compat level to 9. 2014-07-13 16:24:29 +02:00
Julien Cristau
6a7a144be1 Bump changelogs 2014-07-13 16:22:42 +02:00
Julien Cristau
fd99d1a9c8 pixman 0.32.6 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQEcBAABAgAGBQJTuIYBAAoJEIWlZJw4kjNuHA8H/0wBuk7d/7uqCAfqyQ3o5Qs9
 q00UvsZVCymC6f1Hh+bgQGtMHgy2Wo1gvw/usSoxlxqc+T4wWeN912RPZwvprVzn
 v9+J7UyjLH28yUVq9NBn91LqHEWfzLK8gf3Y3i3IIQNd9YtIkqjPMyKDuTaQVUYc
 Op6vzXzjzwf0lKjTTZOWsnm9Zh6vvFoqVOajS6hSvA20/xczknAbU3HfUIBI+G4o
 6/br7A6OpIB08vFAJd1XJpAkrHjjIJCECg3wxsfxuCYcoRSWhUPoul4IEkHXn4p4
 mTKjTzBxuDM85FAadTT7PxygABelcQljMlJPKwY4rJwz5t8/yFLc5h5WXft2laI=
 =z2mk
 -----END PGP SIGNATURE-----

Merge tag 'pixman-0.32.6' into debian-unstable

pixman 0.32.6 release
2014-07-13 16:21:47 +02:00
Søren Sandmann Pedersen
87eea99e44 Pre-release version bump to 0.32.6 2014-07-05 18:55:43 -04:00
Siarhei Siamashka
9f18ea3483 configure.ac: Check if the compiler supports GCC vector extensions
The Intel Compiler 14.0.0 claims version GCC 4.7.3 compatibility
via __GNUC__/__GNUC__MINOR__ macros, but does not provide the same
level of GCC vector extensions support as the original GCC compiler:
    http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html

Which results in the following compilation failure:

In file included from ../test/utils.h(7),
                 from ../test/utils.c(3):
../test/utils-prng.h(138): error: expression must have integral type
      uint32x4 e = x->a - ((x->b << 27) + (x->b >> (32 - 27)));
                            ^

The problem is fixed by doing a special check in configure for
this feature.
2014-07-04 20:52:59 -04:00
Søren Sandmann
50d7b5fa8e create_bits(): Cast the result of height * stride to size_t
In create_bits() both height and stride are ints, so the result is
also an int, which will overflow if height or stride are big enough
and size_t is bigger than int.

This patch simply casts height to size_t to prevent these overflows,
which prevents the crash in:

    https://bugzilla.redhat.com/show_bug.cgi?id=972647

It's not even close to fixing the full problem of supporting big
images in pixman.

See also

    https://bugs.freedesktop.org/show_bug.cgi?id=69014
2014-07-04 20:50:58 -04:00
Nemanja Lukic
c42824ebb5 MIPS: Fix exported symbols in public API. 2014-07-03 13:34:53 -04:00
Julien Cristau
08ff9fa402 Upload to unstable 2013-12-17 22:04:30 +01:00
Julien Cristau
e66148cda6 Bump changelogs 2013-12-08 15:33:18 +01:00
Julien Cristau
9c9f210896 pixman 0.32.4 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSiXHSAAoJEA/daC2XTKcqUtQQALogcIuKShzPrZCnNke9jXJF
 Ujq4M0fHMBru4Uzqq+MCp02ssWLnoBvW8emwzalzt3xulZU+fUeYs1u56Epi1SnG
 oHt5ah1ZSicAwNBlDdflKgqnBGdsFJg5yj9F09zwZeBEBYwhJBaTQfIK6i0sww3s
 MQ66uANWsJQsW8/wFq5pJLmmmSWlelEHXz5pcjLavaYkOIITSzTeZF+xOvhBUwv2
 1zTsv9c2k05cR+8UKDpDURrEn5Cp5uQo0iV9FpKsyKL01ukqCbuBRWVxjSbXCmtu
 GWZ4qDLjScM8sCAQbZF4/MZuGoytC2cKxaWnjKn4h1L4+qZMIvjmcAlsP7CfJ14o
 AtWkYvU6rlY5m4je8Lh3QMbLkSTNFR8ix97jDhFmZlEQA3EXnPvme2YFecOmlVgF
 c1mVhVBR2Je/Hav0LiIne7151dFJ+THCAPOLcVqDCzRw2BMjAfp0Kx7qnFiXyvEt
 zgpoAmybf1kHOCpEugHGKwe4elCTvjq7xv3+JwkzqvV7uIvk1/J0ctIkBsboeMsP
 nvIJ8nBj9fNuJdP++jNX1xsi3C0LM16Bhd5n8wZcX4sqekSVj+LDht4JBPalMC7A
 m50kD9XlFSJ8UyoKrKMGx71XLnkGgT1hbQgE9ML8MumXZZMpjwIb9p7g7D2A1hXM
 /1kzDHmAaqbLcmFBTyO9
 =klDd
 -----END PGP SIGNATURE-----

Merge tag 'pixman-0.32.4' into debian-unstable

pixman 0.32.4 release

Conflicts:
	configure.ac
2013-12-08 15:28:54 +01:00
Maarten Lankhorst
166899c913 release to sid 2013-11-18 15:55:02 +01:00
Maarten Lankhorst
7d8317abd4 Cherry-pick upstream bigfixes for fixing a crash when rendering invalid trapezoids. (LP: #1197921) 2013-11-18 15:54:49 +01:00
Ritesh Khadgaray
f740a26fe1 pixman_trapezoid_valid(): Fix underflow when bottom is close to MIN_INT
If t->bottom is close to MIN_INT (probably invalid value), subtracting
top can lead to underflow which causes crashes.  Attached patch will
fix the issue.

This fixes bug 67484.

(cherry picked from commit 5e14da97f1)
2013-11-18 15:08:42 +01:00
Søren Sandmann Pedersen
f4acde9c71 test/trap-crasher.c: Add trapezoid that demonstrates a crash
This trapezoid causes a crash due to an underflow in the
pixman_trapezoid_valid().

Test case from Ritesh Khadgaray.

(cherry picked from commit 2f876cf867)
2013-11-18 15:08:41 +01:00
Matt Turner
dae5a758e2 Post-release version bump to 0.32.5 2013-11-17 17:48:54 -08:00
Matt Turner
4b3a66b05e Pre-release version bump to 0.32.4 2013-11-17 17:46:52 -08:00
Søren Sandmann
97a655d5ca test/utils.c: Make the stack unaligned only on 32 bit Windows
The call_test_function() contains some assembly that deliberately
causes the stack to be aligned to 32 bits rather than 128 bits on
x86-32. The intention is to catch bugs that surface when pixman is
called from code that only uses a 32 bit alignment.

However, recent versions of GCC apparently make the assumption (either
accidentally or deliberately) that that the incoming stack is aligned
to 128 bits, where older versions only seemed to make this assumption
when compiling with -msse2. This causes the vector code in the PRNG to
now segfault when called from call_test_function() on x86-32.

This patch fixes that by only making the stack unaligned on 32 bit
Windows, where it would definitely be incorrect for GCC to assume that
the incoming stack is aligned to 128 bits.

V2: Put "defined(...)" around __GNUC__

Reviewed-and-Tested-by: Matt Turner <mattst88@gmail.com>
Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=491110
(cherry picked from commit f473fd1e75)
2013-11-17 17:45:56 -08:00
Jakub Bogusz
5a313af74e Fix the SSSE3 CPUID detection.
SSSE3 is detected by bit 9 of ECX, but we were checking bit 9 of EDX
which is APIC leading to SSSE3 routines being called on CPUs without
SSSE3.

Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 8487dfbcd0)
2013-11-17 17:45:54 -08:00
Søren Sandmann
917a52003d Post-release version bump to 0.32.3 2013-11-11 19:55:18 -05:00
Søren Sandmann
a980f83a68 Pre-release version bump to 0.32.2 2013-11-11 19:44:54 -05:00
Søren Sandmann
e2e3817021 demos/Makefile.am: Move EXTRA_DIST outside "if HAVE_GTK"
Without this, if tarballs are generated on a system that doesn't have
GTK+ 2 development headers available, the files in EXTRA_DIST will not
be included, which then causes builds from the tarball to fail on
systems that do have GTK+ 2 headers available.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=71465
2013-11-11 19:13:31 -05:00
Andrea Canciani
950d1310f7 test: Fix the win32 build
The win32 build has no config.h, so HAVE_CONFIG_H should be checked
before including it, as in utils.h.
2013-11-11 19:09:46 -05:00
Søren Sandmann
7a00965d7a Post-release version bump to 0.32.1 2013-11-11 19:07:35 -05:00
Søren Sandmann
895e7e05b7 Pre-release version bump to 0.32.0 2013-11-10 18:05:47 -05:00
Søren Sandmann Pedersen
8cbc7da4e5 Post-release version bump to 0.31.3 2013-11-01 20:52:00 -04:00
Søren Sandmann Pedersen
99e8605be0 Pre-release version bump to 0.31.2 2013-11-01 20:39:46 -04:00
Ritesh Khadgaray
5e14da97f1 pixman_trapezoid_valid(): Fix underflow when bottom is close to MIN_INT
If t->bottom is close to MIN_INT (probably invalid value), subtracting
top can lead to underflow which causes crashes.  Attached patch will
fix the issue.

This fixes bug 67484.
2013-11-01 20:24:57 -04:00
Søren Sandmann Pedersen
2f876cf867 test/trap-crasher.c: Add trapezoid that demonstrates a crash
This trapezoid causes a crash due to an underflow in the
pixman_trapezoid_valid().

Test case from Ritesh Khadgaray.
2013-11-01 20:24:27 -04:00
Brad Smith
8ef7e0d18e Fix pixman build with older GCC releases
The following patch fixes building pixman with older GCC releases
such as GCC 3.3 and older (OpenBSD; some older archs use GCC 3.3.6)
by changing the method of detecting the presence of __builtin_clz
to utilizing an autoconf check to determine its presence. Compilers
that pretend to be GCC, implement __builtin_clz and are already
utilizing the intrinsic include LLVM/Clang, Open64, EKOPath and
PCC.
2013-11-01 20:14:33 -04:00
Søren Sandmann Pedersen
3c2f4b6517 pixman-glyph.c: Add __force_align_arg_pointer to composite functions
The functions pixman_composite_glyphs_no_mask() and
pixman_composite_glyphs() can call into code compiled with -msse2,
which requires the stack to be aligned to 16 bytes. Since the ABIs on
Windows and Linux for x86-32 don't provide this guarantee, we need to
use this attribute to make GCC generate a prologue that realigns the
stack.

This fixes the crash introduced in the previous commit and also

   https://bugs.freedesktop.org/show_bug.cgi?id=70348

and

   https://bugs.freedesktop.org/show_bug.cgi?id=68300
2013-10-17 11:14:14 -04:00
Søren Sandmann Pedersen
3dce229772 utils.c: On x86-32 unalign the stack before calling test_function
GCC when compiling with -msse2 and -mssse3 will assume that the stack
is aligned to 16 bytes even on x86-32 and accordingly issue movdqa
instructions for stack allocated variables.

But despite what GCC thinks, the standard ABI on x86-32 only requires
a 4-byte aligned stack. This is true at least on Windows, but there
also was (and maybe still is) Linux code in the wild that assumed
this. When such code calls into pixman and hits something compiled
with -msse2, we get a segfault from the unaligned movdqas.

Pixman has worked around this issue in the past with the gcc attribute
"force_align_arg_pointer" but the problem has resurfaced now in

    https://bugs.freedesktop.org/show_bug.cgi?id=68300

because pixman_composite_glyphs() is missing this attribute.

This patch makes fuzzer_test_main() call the test_function through a
trampoline, which, on x86-32, has a bit of assembly that deliberately
avoids aligning the stack to 16 bytes as GCC normally expects. The
result is that glyph-test now crashes.

V2: Mark caller-save registers as clobbered, rather than using
noinline on the trampoline.
2013-10-17 11:14:14 -04:00
Siarhei Siamashka
9e81419ed5 configure.ac: check and use -Wdeclaration-after-statement GCC option
The accidental use of declaration after statement breaks compilation
with C89 compilers such as MSVC. Assuming that MSVC is one of the
supported compilers, it makes sense to ask GCC to at least report
warnings for such problematic code.
2013-10-14 00:27:04 +03:00
Siarhei Siamashka
a863bbcce0 sse2: bilinear fast path for src_x888_8888
Running cairo-perf-trace benchmark on Intel Core2 T7300:

Before:
[  0]    image    t-firefox-canvas-swscroll    1.989    2.008   0.43%    8/8
[  1]    image        firefox-canvas-scroll    4.574    4.609   0.50%    8/8

After:
[  0]    image    t-firefox-canvas-swscroll    1.404    1.418   0.51%    8/8
[  1]    image        firefox-canvas-scroll    4.228    4.259   0.36%    8/8
2013-10-14 00:26:51 +03:00
Søren Sandmann Pedersen
8f75f638ab configure.ac: Add check for pmulhuw assembly
Clang 3.0 chokes on the following bit of assembly

    asm ("pmulhuw %1, %0\n\t"
        : "+y" (__A)
        : "y" (__B)
    );

from pixman-mmx.c with this error message:

    fatal error: error in backend: Unsupported asm: input constraint
        with a matching output constraint of incompatible type!

So add a check in configure to only enable MMX when the compiler can
deal with it.
2013-10-12 15:04:27 -04:00
Søren Sandmann Pedersen
09a62d4dbc scale.c: Use int instead of kernel_t for values in named_int_t
The 'value' field in the 'named_int_t' struct is used for both
pixman_repeat_t and pixman_kernel_t values, so the type should be int,
not pixman_kernel_t.

Fixes some warnings like this

scale.c:124:33: warning: implicit conversion from enumeration
      type 'pixman_repeat_t' to different enumeration type
      'pixman_kernel_t' [-Wconversion]
    { "None",                   PIXMAN_REPEAT_NONE },
    ~                           ^~~~~~~~~~~~~~~~~~

when compiled with clang.
2013-10-12 15:04:27 -04:00
Søren Sandmann Pedersen
9367243801 pixman-combine32.c: Make Color Burn routine follow the math more closely
For superluminescent destinations, the old code could underflow in

    uint32_t r = (ad - d) * as / s;

when (ad - d) was negative. The new code avoids this problem (and
therefore causes changes in the checksums of thread-test and
blitters-test), but it is likely still buggy due to the use of
unsigned variables and other issues in the blend mode code.
2013-10-12 15:04:27 -04:00
Søren Sandmann Pedersen
105fa74fad pixman-combine32: Make Color Dodge routine follow the math more closely
Change blend_color_dodge() to follow the math in the comment more
closely.

Note, the new code here is in some sense worse than the old code
because it can now underflow the unsigned variables when the source is
superluminescent and (as - s) is therefore negative. The old code was
careful to clamp to 0.

But for superluminescent variables we really need the ability for the
blend function to become negative, and so the solution the underflow
problem is to just use signed variables. The use of unsigned variables
is a general problem in all of the blend mode code that will have to
be solved later.

The CRC32 values in thread-test and blitters-test are updated to
account for the changes in output.
2013-10-12 15:04:27 -04:00
Søren Sandmann Pedersen
2527a72432 pixman-combine32: Rename a number of variable from sa/sca to as/s
There are no semantic changes, just variables renames. The motivation
for these renames is so that the names are shorter and better match
the one used in the comments.
2013-10-12 15:04:27 -04:00
Søren Sandmann Pedersen
eaa4778c42 pixman-combine32: Improve documentation for blend mode operators
This commit overhauls the comments in pixman-comine32.c regarding
blend modes:

- Add a link to the PDF supplement that clarifies the specification of
  ColorBurn and ColorDodge

- Clarify how the formulas for premultiplied colors are derived form
  the ones in the PDF specifications

- Write out the derivation of the formulas in each blend routine
2013-10-12 15:04:27 -04:00
Søren Sandmann Pedersen
4bf1502fe8 pixman-combine32.c: Formatting fixes
Fix a bunch of spacing issues.

V2: More spacing issues, in the _ca combiners
2013-10-12 15:04:00 -04:00
Andrea Canciani
54be1a52f7 Fix thread-test on non-OpenMP systems
The non-reentrant versions of prng_* functions are thread-safe only in
OpenMP-enabled builds.

Fixes thread-test failing when compiled with Clang (both on Linux and
on MacOS).
2013-10-09 18:23:27 +02:00
Andrea Canciani
0af2fcaebc Add support for SSSE3 to the MSVC build system
Handle SSSE3 just like MMX and SSE2.
2013-10-09 14:23:12 +02:00
Andrea Canciani
e4d9c623d3 Fix build of check-formats on MSVC
Fixes

check-formats.obj : error LNK2019: unresolved external symbol
_strcasecmp referenced in function _format_from_string

check-formats.obj : error LNK2019: unresolved external symbol
_snprintf referenced in function _list_operators
2013-10-09 14:23:11 +02:00
Andrea Canciani
96ad6ebd8b Fix building of "other" programs on MSVC
In d1434d112c the benchmarks have been
extended to include other programs as well and the variable names have
been updated accordingly in the autotools-based build system, but not
in the MSVC one.
2013-10-09 14:23:11 +02:00
Andrea Canciani
31ac784f34 Fix build on MSVC
After a4c79d695d the MMX and SSE2 code
has some declarations after the beginning of a block, which is not
allowed by MSVC.

Fixes multiple errors like:

pixman-mmx.c(3625) : error C2275: '__m64' : illegal use of this type
as an expression

pixman-sse2.c(5708) : error C2275: '__m128i' : illegal use of this
type as an expression
2013-10-09 14:23:11 +02:00
Søren Sandmann Pedersen
c89f4c8266 fast: Swap image and iter flags in generated fast paths
The generated fast paths that were moved into the 'fast'
implementation in ec0e38cbb7 had their
image and iter flag arguments swapped; as a result, none of the fast
paths were ever called.
2013-10-04 14:11:57 -04:00