Commit Graph

19 Commits

Author SHA1 Message Date
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
Siarhei Siamashka
e83cee5aac test: Extend scaling-test to support a8/solid mask and ADD operation
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-15 14:32:01 +02: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
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
Siarhei Siamashka
226a6df4f9 test: 'scaling-test' updated to provide better coverage
Negative scale factors are now also tested. A small additional
translate transform helps to stress the use of fractional
coordinates better.

Also the number of iterations to run by default increased in order
to compensate increased variety of operations to be tested.
2010-07-27 16:07:34 +03:00
Siarhei Siamashka
f905ebb03d test: scaling-test updated to use new fuzzer_test_main() function 2010-05-13 21:04:36 +03: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
cc34554652 test: In scaling-test use the crc32 from utils.c 2009-11-17 00:32:03 -05:00
Søren Sandmann Pedersen
f0c157f888 Extend scaling-test to also test bilinear filtering. 2009-10-26 13:04:21 -04:00
Benjamin Otte
fa49ef81f7 Add default cases for all switch statements
Fixes compilation with -Wswitch-default. Compilation with -Wswitch-enums
works fine as is.
2009-10-20 00:40:40 +02:00
Søren Sandmann Pedersen
83f6e2eacf Reindent and rename identifiers in scaling-test.c 2009-07-13 19:58:04 -04:00
Siarhei Siamashka
51418786e4 Return nonzero code from scaling-test program in case of failure.
This can potentially help in tests automation.
2009-07-10 13:50:15 -04:00
Siarhei Siamashka
71862fe84e Fix scaling-test to work on big endian systems 2009-07-10 13:50:15 -04:00
Søren Sandmann Pedersen
0fce356762 Add workarounds for X servers doing out-of-bounds accesses.
Old X servers rely on out-of-bounds accesses when they are asked
to composite with a window as the source. They create a pixman image
pointing to some bogus position in memory, but then they set a clip
region to the position where the actual bits are.

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.

The workaround added by this commit is to try and detect whether a
source drawable is actually a window without a client clip set. Such a
window will generally have a clip region that corresponds exactly to
the hierarchy clip in the server, whereas pixmaps will have a clip
region that is an exact match to the drawable.

When we detect such a window, we allow a fast path to run that would
normally be rejected due to the sources not completely subsuming the
composite region.

Fixed X servers should call the new function
pixman_disable_out_of_bounds_workaround() to disable the workaround.

This was reported in bug 22484.
2009-07-10 02:57:09 -04:00
Søren Sandmann Pedersen
6b34482870 Update the CRC value in scaling-test.c.
The changes in pixman behavior justifying this are:

- New clipping rules

- Bug fixes in region code. In particular, when
  pixman_region_init_rects() is called on these two boxes:

	{ 2, 6, 7, 6 }
	{ 4, 1, 6, 7 }

  it now ignores the first one, which is empty and produces

	{ 4, 1, 6, 7 }

  Previously, it would produce:

	{ 2, 1, 7, 7 }

  for some reason.
2009-07-09 04:04:00 -04:00
Siarhei Siamashka
21034db1da Scaling test updated to provide better coverage for problematic cases
Now scaling test should reliably detect problems in new scaling code.
Maximum image size reduced to improve performance (more tests can be
run per second) and also simplify detected errors analysis.
2009-05-29 22:23:22 -04:00
Siarhei Siamashka
dbb72c02fd Updated scaling test to support rgb565, source clipping, etc.
Now test provides better coverage for various image scaling
cases. Unused byte for x8r8g8b8 format is ignored. Running
the test program without any command line options provides
a PASS/FAIL verdict based on the precalculated crc32 value
for using pixman with all the fastpath functions disabled,
which should simplify testing for correcteness.
2009-04-24 21:51:30 -04:00
Siarhei Siamashka
a9adae3dc3 Image scaling regression test script
This test script can help in finding regressions in image scaling
fastpath implementations. It uses test program compiled with
and without fastpath code and can compare results of execution
for different pseudorandom compositing operations involving scaling.

Signed-off-by: Søren Sandmann Pedersen <sandmann@redhat.com>
2009-03-31 21:30:03 -04:00