Commit Graph

36 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
5715a394c4 blitters-test: Make common formats more likely to be tested.
Move the eight most common formats to the top of the list of image
formats and make create_random_image() much more likely to select one
of those eight formats.

This should help catch more bugs in SIMD optimized operations.
2011-06-25 10:17:05 -04:00
Alexandros Frantzis
b514e63cfc Add support for the r8g8b8a8 and r8g8b8x8 formats to the tests. 2011-03-22 13:43:29 -04:00
Søren Sandmann Pedersen
84f3c5a71a test: In image_endian_swap() use pixman_image_get_format() to get the bpp.
There is no reason to pass in the bpp as an argument; it can be gotten
directly from the image.
2011-03-07 14:07:44 -05:00
Rolland Dudemaine
32e556df33 test: Use the right enum types instead of int to fix warnings
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-26 15:05:18 +02:00
Søren Sandmann Pedersen
337f0bff0d test: Move palette initialization to utils.[ch] 2010-12-17 16:57:53 -05:00
Søren Sandmann Pedersen
4e89a5b7f3 Remove broken optimizations in combine_disjoint_over_u()
The first broken optimization is that it checks "a != 0x00" where it
should check "s != 0x00". The other is that it skips the computation
when alpha is 0xff. That is wrong because in the formula:

     min (1, (1 - Aa)/Ab)

the render specification states that if Ab is 0, the quotient is
defined to positive infinity. That is the case even if (1 - Aa) is 0.
2010-10-11 12:06:20 -04:00
Dmitri Vorobiev
fd3c87d460 Move aligned_malloc() to utils
The aligned_malloc() routine will be used in more than one test utility.
At least, a low-level blitter benchmark needs it. Therefore, let's make
this function a part of common test utilities code.
2010-09-21 08:50:17 -04:00
Siarhei Siamashka
ba6c98fc4b test: detection of possible floating point registers corruption
Added a pair of macros which can help to detect corruption
of floating point registers after a function call. This may
happen if _mm_empty() call is forgotten in MMX/SSE2 fast
path code, or ARM NEON assembly optimized function
forgets to save/restore d8-d15 registers before use.
2010-09-13 18:12:31 +03:00
Søren Sandmann Pedersen
b243a66041 Add x14r6g6b6 format to blitters-test 2010-08-04 08:58:51 -04:00
Søren Sandmann Pedersen
2e7fb66553 When converting indexed formats to 64 bits, don't correct for channel widths
Indexed formats are mapped to a8r8g8b8 with full precision, so when
expanding we shouldn't correct for the width of the channels
2010-07-11 09:43:56 -04:00
Søren Sandmann Pedersen
2df6dac0be test: Make sure the palettes for indexed format roundtrip properly
The palettes for indexed formats must satisfy the condition that if
some index maps to a color C, then the 15 bit version of that color
must map back to the index. This ensures that the destination operator
is always a no-op, which seems like a reasonable assumption to make.
2010-07-11 09:43:56 -04:00
Søren Sandmann Pedersen
66365b5ef1 Make separate gray scanline storers.
For gray formats the palettes are indexed by luminance, not RGB, so we
can't use the color storers for gray too.
2010-06-18 20:33:02 -04:00
Søren Sandmann Pedersen
4e1d4847c9 When storing a g1 pixel, store the lowest bit, rather than comparing with 0. 2010-06-18 20:33:02 -04:00
Siarhei Siamashka
be387701a5 test: blitters-test updated to use new fuzzer_test_main() function 2010-05-13 21:04:31 +03:00
Søren Sandmann Pedersen
2d65fb033b Don't consider indexed formats opaque.
The indexed formats have 0 bits of alpha, but can't be considered
opaque because there may be non-opaque colors in the palette.
2010-05-03 10:59:36 +03:00
Søren Sandmann Pedersen
de27f45ddd Ensure that only the low 4 bit of 4 bit pixels are stored.
In some cases we end up trying to use the STORE_4 macro with an 8 bit
values, which resulted in other pixels getting overwritten. Fix this
by always masking off the low 4 bits.

This fixes blitters-test on big-endian machines.
2010-03-17 11:02:58 -04:00
Søren Sandmann Pedersen
ff30a5cbb9 test: Add support for indexed formats to blitters-test
These formats work fine, they just need to have a palette set.
2010-03-14 12:25:17 -04:00
Søren Sandmann Pedersen
9a8e404d44 test: Remove obsolete comment 2010-03-03 13:37:20 -05:00
Siarhei Siamashka
dce6e1bd68 test: support for testing pixbuf fast path functions in blitters-test 2009-11-27 15:50:26 +02:00
Søren Sandmann Pedersen
95a08dece3 Remove stray semicolon from blitters-test.c
Pointed out by scottmc2@gmail.com in bug 25137.
2009-11-20 11:18:58 +01:00
Søren Sandmann Pedersen
13f4e02b14 test: Move image_endian_swap() from blitters-test.c to utils.[ch] 2009-11-17 00:32:03 -05:00
Søren Sandmann Pedersen
24e203a8a8 test: Move random number generator from blitters/scaling-test to utils.[ch] 2009-11-17 00:32:03 -05:00
Søren Sandmann Pedersen
b465b8b79d test: Move CRC32 code from blitters-test to new files utils.[ch] 2009-11-17 00:32:03 -05:00
Siarhei Siamashka
5f429e4510 blitters-test updated to also randomly generate mask_x/mask_y 2009-10-27 12:31:55 +02:00
Benjamin Otte
5c3ef4e979 Fix compile warnings 2009-10-20 00:40:40 +02:00
Søren Sandmann Pedersen
358f96d202 Fix double semicolon; pointed out by Travis Griggs 2009-10-08 13:01:27 -04:00
Søren Sandmann Pedersen
16adb09c8a Update CRC value in blitters-test for the new bug fixes 2009-09-24 07:54:37 -04:00
Søren Sandmann Pedersen
e156964d3e Fix bug in blitters-test with BGRA formats.
When masking out the x bits, blitter-test would make the incorrect
assumption that the they were always in the topmost position. This is
not correct for formats of type PIXMAN_TYPE_BGRA.
2009-09-24 07:54:37 -04:00
Søren Sandmann Pedersen
ce966f4d8e Check if we have posix_memalign() in configure.ac. [23260, 23261]
Fall back to malloc() in blitters-test.c if we don't.
2009-08-13 12:46:20 -04:00
Søren Sandmann Pedersen
e084351b13 Update CRC value in blitters-test.
At this point, the SIMD, SSE2, MMX and general implementations all
agree.
2009-08-08 18:52:55 -04:00
Søren Sandmann Pedersen
ba5c5325e7 Various formatting fixes 2009-08-08 18:50:42 -04:00
Søren Sandmann Pedersen
cc5c59b3f2 Add the ability to print intermediate CRC values 2009-08-08 18:50:42 -04:00
Søren Sandmann Pedersen
0bc4adae3e Reenable commented-out tests in blitter-test.
The crashes and valgrind issues are all fixed at this point.
2009-08-08 18:50:42 -04:00
Siarhei Siamashka
9ee18806a9 One more update to blitters-test - use aligned memory
allocations in order in order to make reproducibility
of alignment sensitive bugs more deterministic
Also testing of masks is reenabled
2009-08-08 18:50:42 -04:00
Siarhei Siamashka
4fc0f9dd45 HACK: updated test to better cover new neon optimizations 2009-08-08 18:50:41 -04:00
Siarhei Siamashka
67769ad5bf Test program for stressing the use of different formats and operators
The code and overall method is mostly based on scaling-test. This one
focuses on trying to stress as many different color formats and types
of composition operations as possible.

This is an initial implementation which may need more tuning. Also
not all color format and operator combinations are actually used.

When cpu specific optimizations are disabled, this test provides
identical deterministic results on x86, PPC and ARM.

Script blitters-test-bisect.rb now works in non-stop mode, until
it finds any problem. This allows to run it for example overnight
in order to test a lot more variants of pixman calls and increase
chances of detecting problems in pixman. Just like with scaling-test,
running blitters-test binary alone with no command line arguments
runs a small predefined number of tests and compares checksum
with a reference value for quick verification.
2009-08-08 18:50:41 -04:00