Commit Graph

1048 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
ec6de472d0 region: Enable or disable fatal errors and selfchecks based on version number
There is a couple of bugs in bugzilla where bugs in the X server
triggered asserts in the pixman region code. It is probably better to
let the X server survive this. (In fact, I thought I had disabled them
for 0.16.0, but apparently not).

The patch below uses these rules:

    - In _stable_ pixman releases, assertions and selfchecks are turned
      off. Assertions, so that the X server doesn't die. Selfchecks,
      for performance reasons.

    - In _unstable_ pixman releases, both assertions and selfcheck are
      turned on. These releases are what get added to development
      distributions such as rawhide, so we want as much self-checking
      as possible.

    - In _random git checkouts_, assertions are enabled, so that bugs
      are caught, but selfchecks are disabled so that you can use them
      for performance work without having to fiddle with turning
      selfchecks off.
2009-12-15 11:30:34 -05:00
Søren Sandmann Pedersen
f1ecbaba0c Post-release version bump 2009-09-28 09:31:25 -04:00
Søren Sandmann Pedersen
601e4dc6fd Pre-release version bump 2009-09-28 09:20:13 -04:00
Søren Sandmann Pedersen
b765dcb554 Update CRC in blitters-test for the changes in 10bpc alpha handling 2009-09-28 08:59:11 -04:00
Søren Sandmann Pedersen
66f7581ccf Fix fetch-test for big-endian systems.
Data narrower than 32bpp should be stored in the correct
endian. Reported by Andrea Canciani.
2009-09-28 08:36:01 -04:00
Søren Sandmann Pedersen
485c1f54b4 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-28 08:35:09 -04:00
Søren Sandmann Pedersen
8f5cca82ac Fix alpha handling for 10 bpc formats.
These generally extracted the 2 bits of alpha, then shifted them 62
bits and replicated across 16 bits. Then they were shifted another 48
bits, making the resulting alpha channel 0.
2009-09-28 08:34:38 -04:00
Søren Sandmann Pedersen
09a71a0dc0 Return result from pixman_image_set_transform().
Previously it would always return TRUE, even when malloc() had failed.
2009-09-28 08:33:55 -04:00
Søren Sandmann Pedersen
8138f908aa Revert "Enable component alpha on solid masks."
For consistency we will probably want to allow component alpha to be
set on all masks at some point, but not in the stable branch, and this
commit only enabled it for solid images anyway.

This reverts commit 29e22cf38e.
2009-09-15 08:35:13 -04:00
Søren Sandmann Pedersen
77627554bc Fix off-by-one error in source_image_needs_out_of_bounds_workaround()
If extents->x2/y2 are equal to image->width/height, then the clip is
still inside the drawable, so no workaround is necessary.
2009-09-15 07:54:16 -04:00
Søren Sandmann Pedersen
c31cd73a09 Remove optimization for 0xffffffff and 0xff the add_n_8888_8888_ca fast path
This is an ADD operation, not an OVER. Fixes bug 23934, reported by
Siarhei Siamashka.
2009-09-14 18:53:34 -04:00
Chris Wilson
8035df8bcb Remove duplicated declaration
The pixman_tranform_pixman_f_transform() declaration is repeated 4 lines
down.
2009-09-13 16:29:57 +01:00
Chris Wilson
29e22cf38e Enable component alpha on solid masks. 2009-09-13 16:29:42 +01:00
Chris Wilson
9fe2628702 [sse2] Bit-reversing typo: src != dst 2009-09-13 16:29:19 +01:00
Siarhei Siamashka
2186bc8948 Change CFLAGS order for PPC and ARM configure tests
CFLAGS are always appended to the end of gcc options when compiling
sources in autotools based projects. Configure tests should do the
same. Otherwise build fails on PPC when using CFLAGS="-O2 -mno-altivec"
for example. Similar problem affects ARM.
2009-09-07 00:41:42 +03:00
Siarhei Siamashka
15304e3cdd ARM: Remove fallback to ARMv6 implementation from NEON delegate chain
This can help to fix build problems with '-mthumb' gcc option in CFLAGS.
ARMv6 optimized code can't be compiled for thumb (because of its inline
assembly) and gets automatically disabled in configure. Reference
to it from NEON optimized code resulted in linking problems.

Every ARMv6 optimized fast path function also has a better NEON
counterpart, so there is no need to fallback to ARMv6. Shorter
delegate chain should additionally result in a bit better performance.
2009-09-07 00:41:21 +03:00
M Joonas Pihlaja
61b616067c Default to optimised builds when using a Sun Studio compiler.
Autoconf's AC_PROG_CC sets the default CFLAGS to -O2 -g for
gcc and -g for every other compiler.  This patch defaults
CFLAGS to the equivalent -O -g when we're using Sun Studio's cc
if the user or site admin hasn't already set CFLAGS.
2009-09-03 22:51:22 +03:00
M Joonas Pihlaja
20acda6fde Work around a Sun Studio 12 code generation bug involving _mm_set_epi32().
Calling a static function wrapper around _mm_set_epi32() when not
using optimisation causes Sun Studio 12's cc to emit a spurious
floating point load which confuses the assembler.  Using a macro wrapper
rather than a function steps around the problem.
2009-09-03 22:51:18 +03:00
M Joonas Pihlaja
e30c0037d4 Work around differing _mm_prefetch() prototypes on Solaris.
Sun Studio 12 expects the address to prefetch to be
a const char pointer rather than a __m128i pointer or
void pointer.
2009-09-03 22:51:14 +03:00
Siarhei Siamashka
698b686d58 ARM: workaround for gcc bug in vshll_n_u8 intrinsic
Some versions of gcc (cs2009q1, 4.4.1) incorrectly reject
shift operand having value >= 8, claiming that it is out of
range. So inline assembly is used as a workaround.
2009-09-03 19:51:47 +03:00
Søren Sandmann Pedersen
b02b644d70 Set version number to 0.16.1 2009-09-02 16:09:32 -04:00
Makoto Kato
d465f854b3 Add CPU detection for VC++ x64
VC++ x64 has no inline assembler and x64 mode supports SSE2.
So, it is unnecessary to call cpuid.
2009-09-02 16:04:02 -04:00
Søren Sandmann Pedersen
57812465bf Pre-release version bump 2009-08-28 07:55:30 -04:00
Chris Wilson
9e1a34a0d1 _pixman_run_fast_path: typo
This is one example of a compiler warning that was lost amit the build
noise.

The error here is that in a list of required conditions we used ';'
instead of '&&' with the result of continuing to use the fast-path
even if we had a wide mask.

Another error is that it was testing src, not mask as it should.
2009-08-28 06:43:39 -04:00
Makoto Kato
83d607cbf1 Remove spurious spaces in pixman-x64-mmx-emulation.h 2009-08-28 04:14:11 -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
Siarhei Siamashka
29c2ae4a0c ARM: a fix to pass blitters-test for 'neon_composite_over_n_8_0565'
Inline assembly for handling <8 pixels width did not pass blitters-test.
Fortunately gcc has no problems compiling alternative implementation
which is using RVCT style intrinsics, so it can be used instead.
2009-08-13 18:17:13 +03:00
Søren Sandmann Pedersen
ed4598f08a Post-release version bump 2009-08-11 14:03:24 -04:00
Søren Sandmann Pedersen
bfdae053ea Pre-release version-bump 2009-08-11 13:56:16 -04:00
Søren Sandmann Pedersen
d6016d406a Merge branch 'blitter-test' 2009-08-11 02:04:40 -04:00
Søren Sandmann Pedersen
93923c626f Fix x/y mixup in bits_image_fetch_pixel_convolution()
Bug 23224, reported by Michel Dänzer.
2009-08-10 20:47:36 -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
Søren Sandmann Pedersen
51f597ad32 Delete commented out code in pixman-vmx.c 2009-08-08 18:50:19 -04:00
Søren Sandmann Pedersen
a590eabead Misc formatting fixes for pixman-vmx.c 2009-08-08 18:50:19 -04:00
Søren Sandmann Pedersen
0ebb587e24 In vmx_combine_atop_reverse_ca() extract alpha after inversing 2009-08-08 18:50:19 -04:00
Søren Sandmann Pedersen
3d2f00783f Really fix vmx_combine_over_reverse_ca()
The inverse destination alpha is just one component, not four.
2009-08-08 18:50:19 -04:00
Søren Sandmann Pedersen
2f62a4f46c Fix vmx_combine_out_reverse_ca()
The source alpha is just one component, not four.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
7e58323385 Fix vmx_over_reverse_ca()
Destination alpha must be extracted after inversing, otherwise we end
up with 0xFFs in the rgb channels.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
2382bd9e27 Multiply with the alpha of dest, not inverse alpha 2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
498df0f0bf Fix vmx_combine_vmx_atop_ca()
It didn't compute the mask correct before.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
9650cd7432 Fix vmx_combine_over_ca().
In the non-vector code, the mask needs to be multiplied with source
alpha.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
38b9589fe6 In vmx_combine_out_ca() multiply with the alpha of the negated vdest. 2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
de180baba3 Fix vmx_combine_out_ca()
It should multiply with just the destination alpha channel, not all
four channels.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
5191421d1f Do the full four-component IN computation in vmx_combine_in_ca(). 2009-08-08 18:50:18 -04:00