[Pixman] [PATCH v3] test: Add cover-test
ppaalanen at gmail.com
Fri Sep 4 03:18:03 PDT 2015
On Fri, 4 Sep 2015 12:04:00 +0300
Oded Gabbay <oded.gabbay at gmail.com> wrote:
> On Thu, Sep 3, 2015 at 3:54 PM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > On Wed, 2 Sep 2015 20:35:59 +0100
> > Ben Avison <bavison at riscosopen.org> wrote:
> >> This test aims to verify both numerical correctness and the honouring of
> >> array bounds for scaled plots (both nearest-neighbour and bilinear) at or
> >> close to the boundary conditions for applicability of "cover" type fast paths
> >> and iter fetch routines.
> >> It has a secondary purpose: by setting the env var EXACT (to any value) it
> >> will only test plots that are exactly on the boundary condition. This makes
> >> it possible to ensure that "cover" routines are being used to the maximum,
> >> although this requires the use of a debugger or code instrumentation to
> >> verify.
> >> ---
> >> test/Makefile.sources | 1 +
> >> test/cover-test.c | 426 +++++++++++++++++++++++++++++++++++++++++++++++++
> >> 2 files changed, 427 insertions(+), 0 deletions(-)
> >> create mode 100644 test/cover-test.c
> > Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > I ran cover-test on x86_64 with all combinations of:
> > - interpolation bits 7 and 4
> > - with and without EXACT
> > - PIXMAN_DISABLE unset and set to "ssse3", "ssse3 sse2" and "ssse3 sse2 mmx"
> > They all pass.
> > However, Oded say this fails CRC for him. Maybe he can comment more.
> > Oded, what page size do you have on those PPC64 platforms?
> > Thanks,
> > pq
> PAGESIZE on those systems is 64KB
I can get a CRC failure with this:
@@ -382,6 +382,8 @@ typedef struct
+#define getpagesize(v) (64 * 1024)
/* This is apparently necessary on at least OS X */
FWIW, fence-image-self-test still passes.
This seems to be a case that differs:
$ ./test/cover-test 2
while number 1 does not differ between 4k and 64k page size.
With EXACT set, I get this:
$ ./test/cover-test 2
Doing plots that are exactly aligned to boundaries
src_fmt=r5g6b5, dst_fmt=x8r8g8b8, mask_fmt=null
x_scale=0x000830C1, y_scale=0x00031D66, align left/top, nearest
cover-test: /home/pq/git/pixman/test/cover-test.c:239: check_transform: Assertion `v2.vector <= ((pixman_fixed_t) ((src_img->bits.width) << 16))' failed.
I think we may have a problem with sizes/coordinates.
With 64 kB page size, the minimum fenced image width for r5g6b5 image
is 32768 pixels. GDB tells me src_img->bits.width << 16 is negative.
Similarly the minimum width of an a8 image becomes 64k pixels. These
coordinates do not fit in pixman_fixed_t.
I suppose there is nothing else to do than just skip this and
fence-image-self-test on systems where page size is greater than, say,
16 kB? The required image widths become too large to handle.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 811 bytes
Desc: OpenPGP digital signature
More information about the Pixman