diff options
author | marha <marha@users.sourceforge.net> | 2011-06-27 08:55:46 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-06-27 08:55:46 +0200 |
commit | 0feab87a4300a3e204e259d14a0a63e58e4a3c8f (patch) | |
tree | 0ff984b670b1409d8f665be20dfd8f410bdf2473 /pixman | |
parent | 97c96ddb6f56be198c2e8bf04ff25bc7b48dd1f2 (diff) | |
download | vcxsrv-0feab87a4300a3e204e259d14a0a63e58e4a3c8f.tar.gz vcxsrv-0feab87a4300a3e204e259d14a0a63e58e4a3c8f.tar.bz2 vcxsrv-0feab87a4300a3e204e259d14a0a63e58e4a3c8f.zip |
xwininfo fontconfig mesa pixman git update 27 June 2011
Diffstat (limited to 'pixman')
-rw-r--r-- | pixman/configure.ac | 40 | ||||
-rw-r--r-- | pixman/pixman/pixman-arm-neon-asm.S | 8 | ||||
-rw-r--r-- | pixman/test/blitters-test.c | 22 |
3 files changed, 38 insertions, 32 deletions
diff --git a/pixman/configure.ac b/pixman/configure.ac index 2defbd4a2..8ce9e1923 100644 --- a/pixman/configure.ac +++ b/pixman/configure.ac @@ -90,7 +90,7 @@ AC_DEFUN([PIXMAN_LINK_WITH_ENV],[dnl LIBS="" $1 AC_LINK_IFELSE( - [$2], + [AC_LANG_SOURCE([$2])], [pixman_cc_stderr=`test -f conftest.err && cat conftest.err` pixman_cc_flag=yes], [pixman_cc_stderr=`test -f conftest.err && cat conftest.err` @@ -290,7 +290,7 @@ have_mmx_intrinsics=no AC_MSG_CHECKING(whether to use MMX intrinsics) xserver_save_CFLAGS=$CFLAGS CFLAGS="$MMX_CFLAGS $CFLAGS" -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)) error "Need GCC >= 3.4 for MMX intrinsics" #endif @@ -298,7 +298,7 @@ error "Need GCC >= 3.4 for MMX intrinsics" int main () { __m64 v = _mm_cvtsi32_si64 (1); return _mm_cvtsi64_si32 (v); -}], have_mmx_intrinsics=yes) +}]])], have_mmx_intrinsics=yes) CFLAGS=$xserver_save_CFLAGS AC_ARG_ENABLE(mmx, @@ -342,7 +342,7 @@ AC_MSG_CHECKING(whether to use SSE2 intrinsics) xserver_save_CFLAGS=$CFLAGS CFLAGS="$SSE2_CFLAGS $CFLAGS" -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)) # if !defined(__amd64__) && !defined(__x86_64__) # error "Need GCC >= 4.2 for SSE2 intrinsics on x86" @@ -355,7 +355,7 @@ int main () { __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c; c = _mm_xor_si128 (a, b); return 0; -}], have_sse2_intrinsics=yes) +}]])], have_sse2_intrinsics=yes) CFLAGS=$xserver_save_CFLAGS AC_ARG_ENABLE(sse2, @@ -392,7 +392,7 @@ case $host_os in hwcap_save_LDFLAGS="$LDFLAGS" HWCAP_LDFLAGS='-Wl,-M,$(srcdir)/solaris-hwcap.mapfile' LDFLAGS="$LDFLAGS -Wl,-M,pixman/solaris-hwcap.mapfile" - AC_LINK_IFELSE([int main() { return 0; }], + AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], use_hwcap_mapfile=yes, HWCAP_LDFLAGS="") LDFLAGS="$hwcap_save_LDFLAGS" @@ -424,7 +424,7 @@ have_vmx_intrinsics=no AC_MSG_CHECKING(whether to use VMX/Altivec intrinsics) xserver_save_CFLAGS=$CFLAGS CFLAGS="$VMX_CFLAGS $CFLAGS" -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)) error "Need GCC >= 3.4 for sane altivec support" #endif @@ -433,7 +433,7 @@ int main () { vector unsigned int v = vec_splat_u32 (1); v = vec_sub (v, v); return 0; -}], have_vmx_intrinsics=yes) +}]])], have_vmx_intrinsics=yes) CFLAGS=$xserver_save_CFLAGS AC_ARG_ENABLE(vmx, @@ -466,7 +466,7 @@ have_arm_simd=no AC_MSG_CHECKING(whether to use ARM SIMD assembler) xserver_save_CFLAGS=$CFLAGS CFLAGS="-x assembler-with-cpp $CFLAGS" -AC_COMPILE_IFELSE([[ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ .text .arch armv6 .object_arch armv4 @@ -476,7 +476,7 @@ AC_COMPILE_IFELSE([[ #error EABI is required (to be sure that calling conventions are compatible) #endif pld [r0] -uqadd8 r0, r0, r0]], have_arm_simd=yes) +uqadd8 r0, r0, r0]])], have_arm_simd=yes) CFLAGS=$xserver_save_CFLAGS AC_ARG_ENABLE(arm-simd, @@ -505,7 +505,7 @@ have_arm_neon=no AC_MSG_CHECKING(whether to use ARM NEON assembler) xserver_save_CFLAGS=$CFLAGS CFLAGS="-x assembler-with-cpp $CFLAGS" -AC_COMPILE_IFELSE([[ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ .text .fpu neon .arch armv7a @@ -517,7 +517,7 @@ AC_COMPILE_IFELSE([[ #error EABI is required (to be sure that calling conventions are compatible) #endif pld [r0] -vmovn.u16 d0, q0]], have_arm_neon=yes) +vmovn.u16 d0, q0]])], have_arm_neon=yes) CFLAGS=$xserver_save_CFLAGS AC_ARG_ENABLE(arm-neon, @@ -545,12 +545,12 @@ dnl Check for GNU-style inline assembly support have_gcc_inline_asm=no AC_MSG_CHECKING(whether to use GNU-style inline assembler) -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ int main () { /* Most modern architectures have a NOP instruction, so this is a fairly generic test. */ asm volatile ( "\tnop\n" : : : "cc", "memory" ); return 0; -}], have_gcc_inline_asm=yes) +}]])], have_gcc_inline_asm=yes) AC_ARG_ENABLE(gcc-inline-asm, [AC_HELP_STRING([--disable-gcc-inline-asm], @@ -685,7 +685,7 @@ dnl Thread local storage support_for__thread=no AC_MSG_CHECKING(for __thread) -AC_LINK_IFELSE([ +AC_LINK_IFELSE([AC_LANG_SOURCE([[ #if defined(__MINGW32__) && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) #error This MinGW version has broken __thread support #endif @@ -694,7 +694,7 @@ AC_LINK_IFELSE([ #endif static __thread int x ; int main () { x = 123; return x; } -], support_for__thread=yes) +]])], support_for__thread=yes) if test $support_for__thread = yes; then AC_DEFINE([TOOLCHAIN_SUPPORTS__THREAD],[],[Whether the tool chain supports __thread]) @@ -706,7 +706,7 @@ dnl dnl posix tls dnl -m4_define([pthread_test_program],[dnl +m4_define([pthread_test_program],AC_LANG_SOURCE([[dnl #include <stdlib.h> #include <pthread.h> @@ -739,7 +739,7 @@ main () } return 0; } -]) +]])) AC_DEFUN([PIXMAN_CHECK_PTHREAD],[dnl if test "z$support_for_pthread_setspecific" != "zyes"; then @@ -780,7 +780,7 @@ dnl __attribute__((constructor)) support_for_attribute_constructor=no AC_MSG_CHECKING(for __attribute__((constructor))) -AC_LINK_IFELSE([ +AC_LINK_IFELSE([AC_LANG_SOURCE([[ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) /* attribute 'constructor' is supported since gcc 2.7, but some compilers * may only pretend to be gcc, so let's try to actually use it @@ -791,7 +791,7 @@ int main (void) { return x; } #else #error not gcc or gcc version is older than 2.7 #endif -], support_for_attribute_constructor=yes) +]])], support_for_attribute_constructor=yes) if test x$support_for_attribute_constructor = xyes; then AC_DEFINE([TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR], diff --git a/pixman/pixman/pixman-arm-neon-asm.S b/pixman/pixman/pixman-arm-neon-asm.S index 833f18c2e..7cddf7e4f 100644 --- a/pixman/pixman/pixman-arm-neon-asm.S +++ b/pixman/pixman/pixman-arm-neon-asm.S @@ -1514,11 +1514,11 @@ generate_composite_function \ * output: updated src in {d0, d1, d2 } [B, G, R] * updated mask in {d24, d25, d26} [B, G, R] */ - vmull.u8 q1, d25, d9 + vmull.u8 q6, d26, d10 vqadd.u8 q8, q0, q8 vmull.u8 q0, d24, d8 vqadd.u8 d22, d2, d22 - vmull.u8 q6, d26, d10 + vmull.u8 q1, d25, d9 /* * convert the result in d16, d17, d22 to r5g6b5 and store * it into {d28, d29} @@ -1541,6 +1541,7 @@ generate_composite_function \ vrshr.u16 q11, q12, #8 vrshr.u16 q8, q9, #8 vrshr.u16 q6, q13, #8 + vraddhn.u16 d24, q12, q11 vraddhn.u16 d25, q9, q8 /* * convert 8 r5g6b5 pixel data from {d4, d5} to planar @@ -1549,11 +1550,10 @@ generate_composite_function \ */ vshrn.u16 d17, q2, #3 vshrn.u16 d18, q2, #8 - vraddhn.u16 d24, q12, q11 vraddhn.u16 d26, q13, q6 vsli.u16 q2, q2, #5 - vsri.u8 d18, d18, #5 vsri.u8 d17, d17, #6 + vsri.u8 d18, d18, #5 /* * 'combine_over_ca' replacement * diff --git a/pixman/test/blitters-test.c b/pixman/test/blitters-test.c index 3ecfb0994..594ec548b 100644 --- a/pixman/test/blitters-test.c +++ b/pixman/test/blitters-test.c @@ -14,6 +14,11 @@ static pixman_indexed_t rgb_palette[9]; static pixman_indexed_t y_palette[9]; +/* The first eight format in the list are by far the most widely + * used formats, so we test those more than the others + */ +#define N_MOST_LIKELY_FORMATS 8 + /* Create random image for testing purposes */ static pixman_image_t * create_random_image (pixman_format_code_t *allowed_formats, @@ -29,6 +34,9 @@ create_random_image (pixman_format_code_t *allowed_formats, while (allowed_formats[n] != PIXMAN_null) n++; + + if (n > N_MOST_LIKELY_FORMATS && lcg_rand_n (4) != 0) + n = N_MOST_LIKELY_FORMATS; fmt = allowed_formats[lcg_rand_n (n)]; width = lcg_rand_n (max_width) + 1; @@ -177,12 +185,14 @@ static pixman_op_t op_list[] = { static pixman_format_code_t img_fmt_list[] = { PIXMAN_a8r8g8b8, + PIXMAN_a8b8g8r8, PIXMAN_x8r8g8b8, + PIXMAN_x8b8g8r8, PIXMAN_r5g6b5, - PIXMAN_r3g3b2, + PIXMAN_b5g6r5, PIXMAN_a8, - PIXMAN_a8b8g8r8, - PIXMAN_x8b8g8r8, + PIXMAN_a1, + PIXMAN_r3g3b2, PIXMAN_b8g8r8a8, PIXMAN_b8g8r8x8, PIXMAN_r8g8b8a8, @@ -190,8 +200,6 @@ static pixman_format_code_t img_fmt_list[] = { PIXMAN_x14r6g6b6, PIXMAN_r8g8b8, PIXMAN_b8g8r8, - PIXMAN_r5g6b5, - PIXMAN_b5g6r5, PIXMAN_x2r10g10b10, PIXMAN_a2r10g10b10, PIXMAN_x2b10g10r10, @@ -204,7 +212,6 @@ static pixman_format_code_t img_fmt_list[] = { PIXMAN_x4r4g4b4, PIXMAN_a4b4g4r4, PIXMAN_x4b4g4r4, - PIXMAN_a8, PIXMAN_r3g3b2, PIXMAN_b2g3r3, PIXMAN_a2r2g2b2, @@ -222,7 +229,6 @@ static pixman_format_code_t img_fmt_list[] = { PIXMAN_b1g2r1, PIXMAN_a1r1g1b1, PIXMAN_a1b1g1r1, - PIXMAN_a1, PIXMAN_null }; @@ -417,6 +423,6 @@ main (int argc, const char *argv[]) } return fuzzer_test_main("blitters", 2000000, - 0x265CDFEB, + 0xB610300B, test_composite, argc, argv); } |