summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2011-05-17Fixes due to rebasingorcDavid Schleef1-1/+1
2011-05-17Update for splatw0q->splatw3q changeDavid Schleef1-0/+7
2011-05-17hackingDavid Schleef2-6/+120
2011-05-17update for current orcDavid Schleef1-30/+78
2011-05-17random stuffDavid Schleef2-7/+45
2011-05-17Add xor operatorDavid Schleef1-12/+23
2011-05-17Add atop operatorDavid Schleef1-11/+20
2011-05-17orc: Add out operatorDavid Schleef1-16/+15
2011-05-17orc: test program to check orc generated codeDavid Schleef2-1/+173
2011-05-17test: Fix compilation on win32Andrea Canciani1-3/+1
MSVC complains about uint32_t being used as an expression: composite.c(902) : error C2275: 'uint32_t' : illegal use of this type as an expression
2011-05-09Check for working mmap()Dave Yeo1-1/+1
OS/2 doesn't have a working mmap().
2011-04-18Offset rendering in pixman_composite_trapezoids() by (x_dst, y_dst)Søren Sandmann Pedersen1-1/+1
Previously, this function would do coordinate calculations in such a way that (x_dst, y_dst) would only affect the alignment of the source image, but not of the traps, which would always be considered to be in absolute destination coordinates. This is unlike the pixman_image_composite() function which also registers the mask to the destination. This patch makes it so that traps are also offset by (x_dst, y_dst). Also add a comment explaining how this function is supposed to operate, and update tri-test.c and composite-trap-test.c to deal with the new semantics.
2011-03-22test: Fix infinite loop in compositeSøren Sandmann Pedersen1-4/+4
When run in PIXMAN_RANDOMIZE_TESTS mode, this test would go into an infinite loop because the loop started at 'seed' but the stop condition was still N_TESTS.
2011-03-22Add support for the r8g8b8a8 and r8g8b8x8 formats to the tests.Alexandros Frantzis4-2/+28
2011-03-19test: Randomize some tests if PIXMAN_RANDOMIZE_TESTS is setSøren Sandmann Pedersen4-16/+51
This patch makes so that composite and stress-test will start from a random seed if the PIXMAN_RANDOMIZE_TESTS environment variable is set. Running the test suite in this mode is useful to get more test coverage. Also, in stress-test.c make it so that setting the initial seed causes threads to be turned off. This makes it much easier to see when something fails.
2011-03-07test: Do endian swapping of the source and destination images.Søren Sandmann Pedersen1-0/+4
Otherwise the test fails on big endian. Fix for bug 34767, reported by Siarhei Siamashka.
2011-03-07test: In image_endian_swap() use pixman_image_get_format() to get the bpp.Søren Sandmann Pedersen6-12/+17
There is no reason to pass in the bpp as an argument; it can be gotten directly from the image.
2011-02-28test: check correctness of 'bilinear_pad_repeat_get_scanline_bounds'Siarhei Siamashka2-0/+95
Individual correctness check for the new bilinear scaling related supplementary function. This test program uses a bit wider range of input arguments, not covered by other tests.
2011-02-28test: Silence MSVC warningsAndrea Canciani3-1/+3
MSVC does not notice non-returning functions (abort() / assert(0)) and warns about paths which end with them in non-void functions: c:\cygwin\home\ranma42\code\fdo\pixman\test\fetch-test.c(114) : warning C4715: 'reader' : not all control paths return a value c:\cygwin\home\ranma42\code\fdo\pixman\test\stress-test.c(133) : warning C4715: 'real_reader' : not all control paths return a value c:\cygwin\home\ranma42\code\fdo\pixman\test\composite.c(431) : warning C4715: 'calc_op' : not all control paths return a value These warnings can be silenced by adding a return after the termination call.
2011-02-28test: Add Makefile for Win32Andrea Canciani1-0/+73
2011-02-28test: Fix tests for compilation on WindowsAndrea Canciani3-54/+47
The Microsoft C compiler cannot handle subobject initialization and Win32 does not provide snprintf. Work around these limitations by using normal struct initialization and using sprintf (a manual check shows that the buffer size is sufficient).
2011-02-15Add a test program for pixman_composite_trapezoids().Søren Sandmann Pedersen2-0/+255
A CRC32 based test program to check that pixman_composite_trapezoids() actually works.
2011-02-15test/Makefile.am: Move all the TEST_LDADD into a new global LDADD.Søren Sandmann Pedersen1-34/+1
This gets rid of a bunch of replicated *_LDADD clauses
2011-02-15Add @TESTPROGS_EXTRA_LDFLAGS@ to AM_LDFLAGSSøren Sandmann Pedersen1-17/+1
Instead of explicitly adding it to each test program.
2011-02-15Move all the GTK+ based test programs to a new subdir, "demos"Søren Sandmann Pedersen12-1060/+1
This separates the test suite from the random gtk+ using test programs. "demos" is somewhat misleading because the programs there are not particularly exciting (with the possible exception of composite-test which shows off all the compositing operators).
2011-02-15test: Extend scaling-test to support a8/solid mask and ADD operationSiarhei Siamashka1-9/+127
Image width also has been increased because SIMD optimizations typically do more unrolling in the inner loops, and this needs to be tested.
2011-02-10test: affine-test updated to stress 90/180/270 degrees rotation moreSiarhei Siamashka1-4/+30
2011-01-28Add a test for over_x888_8_0565 in lowlevel_blt_bench().Søren Sandmann Pedersen1-0/+1
The next few commits will speed this up quite a bit. Current output: --- reference memcpy speed = 2217.5MB/s (554.4MP/s for 32bpp fills) --- over_x888_8_0565 = L1: 54.67 L2: 54.01 M: 52.33 ( 18.88%) HT: 37.19 VT: 35.54 R: 29.40 RT: 13.63 ( 162Kops/s)
2011-01-26test: Use the right enum types instead of int to fix warningsRolland Dudemaine4-19/+27
Green Hills Software MULTI compiler was producing a number of warnings due to incorrect uses of int instead of the correct corresponding pixman_*_t type.
2011-01-25test: Fix for mismatched 'fence_malloc' prototype/implementationRolland Dudemaine1-1/+1
Solves compilation problem when 'mprotect' is not available. For example, when using Green Hills Software MULTI compiler or mingw: http://lists.freedesktop.org/archives/pixman/2011-January/000939.html
2011-01-19Add a test for radial gradientsAndrea Canciani2-0/+202
radial-test is a port of the radial-gradient test from the cairo test suite. It has been modified so that some pixels have 0 in both the a and b coefficients of the quadratic equation solved by the rasterizer, to expose a division by zero in the original implementation.
2011-01-18Turn on testing for destination transformationSøren Sandmann Pedersen1-7/+4
2011-01-16A new configure option --enable-static-testprogsSiarhei Siamashka1-0/+21
This option can be used for building fully static binaries of the test programs so that they can be easily run using qemu-user. With binfmt-misc configured, 'make check' works fine for crosscompiled pixman builds.
2010-12-20Add a test compositing with the various PDF operators.Søren Sandmann Pedersen2-0/+88
The test has floating point exceptions enabled, and currently fails with a divide-by-zero.
2010-12-20Fix linking issues when HAVE_FEENABLEEXCEPT is set.Cyril Brulebois1-1/+1
All objects using test/util.c fail to link: | CCLD region-test | /usr/bin/ld: utils.o: in function enable_fp_exceptions:utils.c(.text+0x939): error: undefined reference to 'feenableexcept' There's indeed no explicit dependency on -lm, and if HAVE_FEENABLEEXCEPT happens to be set, test/util.c uses feenableexcept(), which is nowhere to be found while linking. Fix this by adding -lm to TEST_LDADD, although two alternatives could be thought of: - Only specifying -lm for objects using util.c. - Introducing a conditional to add -lm only when configure detects have_feenableexcept=yes. Signed-off-by: Cyril Brulebois <kibi@debian.org>
2010-12-18Remove stray #include <fenv.h>Jon TURNEY1-1/+0
Remove a stray #include <fenv.h> added in commit 2444b2265abeaf6dcf3df1763bc2711684e63bb8 to fix compilation on platforms which don't have fenv.h Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-12-17Add a stress-test program.Søren Sandmann Pedersen3-0/+868
This test program tries to use as many rarely-used features as possible, including alpha maps, accessor functions, oddly-sized images, strange transformations, conical gradients, etc. The hope is to provoke crashes or irregular behavior in pixman.
2010-12-17Make the argument to fence_malloc() an int64_tSøren Sandmann Pedersen2-3/+6
That way we can detect if someone attempts to allocate a negative size and abort instead of just returning NULL and segfaulting later.
2010-12-17test/utils.c: Initialize palette->rgba to 0.Søren Sandmann Pedersen1-0/+2
That way it can be used with palettes that are not statically allocated, without causing valgrind issues.
2010-12-17test: Move palette initialization to utils.[ch]Søren Sandmann Pedersen3-55/+59
2010-12-17Extend gradient-crash-testSøren Sandmann Pedersen2-43/+87
Test the gradients with various transformations, and test cases where the gradients are specified with two identical points.
2010-12-17Add enable_fp_exceptions() function in utils.[ch]Søren Sandmann Pedersen2-0/+29
This function enables floating point traps if possible.
2010-12-17test: Make composite test use some existing macros instead of defining its ownSøren Sandmann Pedersen2-30/+28
Also move the ARRAY_LENGTH macro into utils.h so it can be used elsewhere.
2010-11-04Remove workaround for a bug in the 1.6 X server.Søren Sandmann Pedersen2-175/+0
There used to be a bug in the X server where it would rely on out-of-bounds accesses when it was asked to composite with a window as the source. It would create a pixman image pointing to some bogus position in memory, but then set a clip region to the position where the actual bits were. Due to a bug in old versions of pixman, where it would not clip against the image bounds when a clip region was set, this would actually work. So when the pixman bug was fixed, a workaround was added to allow certain out-of-bound accesses. However, the 1.6 X server is so old now that we can remove this workaround. This does mean that if you update pixman to 0.22 or later, you will need to use a 1.7 X server or later.
2010-10-24Plug another leak in alphamap testJon TURNEY1-0/+5
Even after commit e46be417cebac984a858da05e61d924889695c9e alphamap test is still leaking the alphamap pixmap, leading to mmap() failures on cygwin Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-11Plug leak in the alphamap test.Søren Sandmann Pedersen1-1/+15
The images are being created with non-NULL data, so we have to free it outselves. This is important because the Cygwin tinderbox is running out of memory and produces this: mmap failed on 20000 1507328 mmap failed on 40000 1507328 mmap failed on 20000 1507328 mmap failed on 40000 1507328 mmap failed on 40000 1507328 mmap failed on 40000 1507328 http://tinderbox.x.org/builds/2010-10-05-0014/logs/pixman/#check
2010-10-11test: Add some more colors to the color table in composite.cSøren Sandmann Pedersen1-1/+3
Specifically, add transparent black and superluminescent white with alpha = 0.
2010-10-11test: Parallize composite.c with OpenMPSøren Sandmann Pedersen1-4/+6
Each test uses the test number as the random number seed; if it didn't, all the threads would run the same tests since they would all start from the same seed.
2010-10-11test: Change composite so that it tests randomly generated imagesSøren Sandmann Pedersen2-98/+111
Previously this test would try to exhaustively test all combinations of formats and operators, which meant that it would take hours to run. Instead, generate images randomly and test compositing those. Cc: chris@chris-wilson.co.uk
2010-10-11test: Fix eval_diff() so that it provides useful error values.Søren Sandmann Pedersen1-31/+15
Previously, this function would evaluate the error under the assumption that the format was 565 or wider. This patch changes it to take the actual format into account. With that fixed, we can turn on testing for the rest of the formats. Cc: chris@chris-wilson.co.uk