| Summary: | pixman composite-traps-test fails on a big endian system | ||
|---|---|---|---|
| Product: | pixman | Reporter: | Siarhei Siamashka <siarhei.siamashka> |
| Component: | pixman | Assignee: | Søren Sandmann Pedersen <soren.sandmann> |
| Status: | RESOLVED FIXED | QA Contact: | Søren Sandmann Pedersen <soren.sandmann> |
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | git master | ||
| Hardware: | PowerPC | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
|
Description
Siarhei Siamashka
2011-02-26 08:18:17 UTC
Do you know if _all_ the test cases are different from little-endian, or if it is only particular ones? Unfortunately, I don't have access to a big-endian system at the moment. I only accidentally noticed this issue when doing some other tests and did not investigate it yet. OK, I'll have a look at it a bit later. I have access to a big-endian system now, so I'll look into this issue myself. The patch below is certainly part of the fix, but there is still something wrong when 1 and 4 bit images are involved.
diff --git a/test/composite-traps-test.c b/test/composite-traps-test.c
index 8f32778..0e4a06e 100644
--- a/test/composite-traps-test.c
+++ b/test/composite-traps-test.c
@@ -139,6 +139,8 @@ test_composite (int testnum,
pixman_image_set_source_clipping (src_img, 1);
pixman_region_fini (&clip);
}
+
+ image_endian_swap (src_img, src_bpp * 8);
}
/* Create destination image */
@@ -157,6 +159,8 @@ test_composite (int testnum,
dst_img = pixman_image_create_bits (
dst_format, dst_width, dst_height, dst_bits, dst_stride);
+
+ image_endian_swap (dst_img, dst_bpp * 8);
}
/* Create traps */
The problem was that this:
src_bpp * 8
doesn't work when bits-per-pixel is less than 8. I have sent some fixes to the list:
http://lists.freedesktop.org/archives/pixman/2011-March/001113.html
http://lists.freedesktop.org/archives/pixman/2011-March/001114.html
Fixed in master |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.