diff --git a/configure.ac b/configure.ac index ad1f47e..9cecabc 100644 --- a/configure.ac +++ b/configure.ac @@ -54,7 +54,7 @@ AC_PREREQ([2.57]) m4_define([pixman_major], 0) m4_define([pixman_minor], 30) -m4_define([pixman_micro], 0) +m4_define([pixman_micro], 3) m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro]) @@ -279,7 +279,7 @@ AC_MSG_CHECKING(whether to use Loongson MMI assembler) xserver_save_CFLAGS=$CFLAGS CFLAGS=" $LS_CFLAGS $CFLAGS -I$srcdir" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +AC_LINK_IFELSE([AC_LANG_SOURCE([[ #ifndef __mips_loongson_vector_rev #error "Loongson Multimedia Instructions are only available on Loongson" #endif @@ -616,7 +616,7 @@ AC_ARG_ENABLE(arm-iwmmxt2, if test "x$IWMMXT_CFLAGS" = "x" ; then IWMMXT_CFLAGS="-flax-vector-conversions -Winline -march=iwmmxt" if test $enable_iwmmxt2 != no ; then - IWMMXT_CFLAGS+="2" + IWMMXT_CFLAGS="${IWMMXT_CFLAGS}2" fi fi @@ -778,7 +778,7 @@ PKG_PROG_PKG_CONFIG if test $enable_gtk = yes ; then AC_CHECK_LIB([pixman-1], [pixman_version_string]) - PKG_CHECK_MODULES(GTK, [gtk+-2.0 pixman-1]) + PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.16 pixman-1]) fi if test $enable_gtk = auto ; then @@ -786,7 +786,7 @@ if test $enable_gtk = auto ; then fi if test $enable_gtk = auto ; then - PKG_CHECK_MODULES(GTK, [gtk+-2.0 pixman-1], [enable_gtk=yes], [enable_gtk=no]) + PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.16 pixman-1], [enable_gtk=yes], [enable_gtk=no]) fi AM_CONDITIONAL(HAVE_GTK, [test "x$enable_gtk" = xyes]) diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c index 26b39d5..5ff7b6e 100644 --- a/pixman/pixman-filter.c +++ b/pixman/pixman-filter.c @@ -28,7 +28,9 @@ #include #include #include +#ifdef HAVE_CONFIG_H #include +#endif #include "pixman-private.h" typedef double (* kernel_func_t) (double x); diff --git a/pixman/pixman-vmx.c b/pixman/pixman-vmx.c index 6868704..f629003 100644 --- a/pixman/pixman-vmx.c +++ b/pixman/pixman-vmx.c @@ -25,7 +25,9 @@ * Based on fbmmx.c by Owen Taylor, Søren Sandmann and Nicholas Miell */ +#ifdef HAVE_CONFIG_H #include +#endif #include "pixman-private.h" #include "pixman-combine32.h" #include diff --git a/test/alpha-loop.c b/test/alpha-loop.c index eca7615..4d4384d 100644 --- a/test/alpha-loop.c +++ b/test/alpha-loop.c @@ -8,6 +8,7 @@ int main (int argc, char **argv) { + pixman_image_t *a, *d, *s; uint8_t *alpha; uint32_t *src, *dest; @@ -17,9 +18,9 @@ main (int argc, char **argv) src = (uint32_t *)make_random_bytes (WIDTH * HEIGHT * 4); dest = (uint32_t *)make_random_bytes (WIDTH * HEIGHT * 4); - pixman_image_t *a = pixman_image_create_bits (PIXMAN_a8, WIDTH, HEIGHT, (uint32_t *)alpha, WIDTH); - pixman_image_t *d = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, dest, WIDTH * 4); - pixman_image_t *s = pixman_image_create_bits (PIXMAN_a2r10g10b10, WIDTH, HEIGHT, src, WIDTH * 4); + a = pixman_image_create_bits (PIXMAN_a8, WIDTH, HEIGHT, (uint32_t *)alpha, WIDTH); + d = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, dest, WIDTH * 4); + s = pixman_image_create_bits (PIXMAN_a2r10g10b10, WIDTH, HEIGHT, src, WIDTH * 4); fail_after (5, "Infinite loop detected: 5 seconds without progress\n"); diff --git a/test/matrix-test.c b/test/matrix-test.c index 8437dd2..0a5f203 100644 --- a/test/matrix-test.c +++ b/test/matrix-test.c @@ -70,6 +70,53 @@ pixman_bool_t does_it_fit_fixed_48_16 (__float128 x) #endif +static inline uint32_t +byteswap32 (uint32_t x) +{ + return ((x & ((uint32_t)0xFF << 24)) >> 24) | + ((x & ((uint32_t)0xFF << 16)) >> 8) | + ((x & ((uint32_t)0xFF << 8)) << 8) | + ((x & ((uint32_t)0xFF << 0)) << 24); +} + +static inline uint64_t +byteswap64 (uint64_t x) +{ + return ((x & ((uint64_t)0xFF << 56)) >> 56) | + ((x & ((uint64_t)0xFF << 48)) >> 40) | + ((x & ((uint64_t)0xFF << 40)) >> 24) | + ((x & ((uint64_t)0xFF << 32)) >> 8) | + ((x & ((uint64_t)0xFF << 24)) << 8) | + ((x & ((uint64_t)0xFF << 16)) << 24) | + ((x & ((uint64_t)0xFF << 8)) << 40) | + ((x & ((uint64_t)0xFF << 0)) << 56); +} + +static void +byteswap_transform (pixman_transform_t *t) +{ + int i, j; + + if (is_little_endian ()) + return; + + for (i = 0; i < 3; i++) + for (j = 0; j < 3; j++) + t->matrix[i][j] = byteswap32 (t->matrix[i][j]); +} + +static void +byteswap_vector_48_16 (pixman_vector_48_16_t *v) +{ + int i; + + if (is_little_endian ()) + return; + + for (i = 0; i < 3; i++) + v->v[i] = byteswap64 (v->v[i]); +} + uint32_t test_matrix (int testnum, int verbose) { @@ -90,6 +137,8 @@ test_matrix (int testnum, int verbose) #endif prng_randmemset (&ti, sizeof(ti), 0); prng_randmemset (&vi, sizeof(vi), 0); + byteswap_transform (&ti); + byteswap_vector_48_16 (&vi); for (j = 0; j < 3; j++) { @@ -132,8 +181,6 @@ test_matrix (int testnum, int verbose) else transform_ok = pixman_transform_point_31_16 (&ti, &vi, &result_i); - crc32 = compute_crc32 (crc32, &result_i, sizeof(result_i)); - #ifdef HAVE_FLOAT128 /* compare with a reference 128-bit floating point implementation */ for (j = 0; j < 3; j++) @@ -173,6 +220,8 @@ test_matrix (int testnum, int verbose) } } #endif + byteswap_vector_48_16 (&result_i); + crc32 = compute_crc32 (crc32, &result_i, sizeof (result_i)); } return crc32; }