summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@redhat.com>2009-09-26 13:12:14 -0400
committerSøren Sandmann Pedersen <sandmann@redhat.com>2009-09-26 14:10:20 -0400
commit15c14691a71daa29c86cce40ac0b4a14acf8f2fc (patch)
treec039e33d32739fa45b1192a9ada50fe0e0f483f7
parent02d70998885065bcea55cb2a8bfa75473083bc17 (diff)
Fix fetch-test for big-endian systems.
Data narrower than 32bpp should be stored in the correct endian. Reported by Andrea Canciani.
-rw-r--r--test/fetch-test.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/fetch-test.c b/test/fetch-test.c
index c41f1a63..6306a4c4 100644
--- a/test/fetch-test.c
+++ b/test/fetch-test.c
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "pixman.h"
+#include <config.h>
#define SIZE 1024
@@ -34,8 +35,13 @@ testcase_t testcases[] = {
.format = PIXMAN_g1,
.width = 8, .height = 2,
.stride = 4,
+#ifdef WORDS_BIGENDIAN
+ .src = { 0xaa000000,
+ 0x55000000 },
+#else
.src = { 0x00000055,
0x000000aa },
+#endif
.dst = { 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000,
0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff },
.indexed = &mono_pallete,
@@ -51,14 +57,24 @@ testcase_t testcases[] = {
0x00898989, 0x00ababab, 0x00cdcdcd, 0x00efefef, },
},
#endif
+ /* FIXME: make this work on big endian */
{
.format = PIXMAN_yv12,
.width = 8, .height = 2,
.stride = 8,
+#ifdef WORDS_BIGENDIAN
+ .src = { 0x00ff00ff, 0x00ff00ff,
+ 0xff00ff00, 0xff00ff00,
+ 0x80ff8000,
+ 0x800080ff
+ },
+#else
.src = { 0xff00ff00, 0xff00ff00,
0x00ff00ff, 0x00ff00ff,
0x0080ff80,
- 0xff800080},
+ 0xff800080
+ },
+#endif
.dst = {
0xff000000, 0xffffffff, 0xffb80000, 0xffffe113,
0xff000000, 0xffffffff, 0xff0023ee, 0xff4affff,