From 5c828c201d6921caa566748a0abf39eb2542d341 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Sat, 22 Feb 2014 21:41:36 +0100 Subject: [PATCH] EXA/evergreen/ni: fix solid pixmaps on big endian Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74939 --- src/evergreen_exa.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index 5957d0b..02c39ec 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -1140,10 +1140,17 @@ static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, u struct radeon_accel_state *accel_state = info->accel_state; float pix_r = 0, pix_g = 0, pix_b = 0, pix_a = 0; +#if X_BYTE_ORDER == X_BIG_ENDIAN + uint32_t w = (fg >> 0) & 0xff; + uint32_t z = (fg >> 8) & 0xff; + uint32_t y = (fg >> 16) & 0xff; + uint32_t x = (fg >> 24) & 0xff; +#else uint32_t w = (fg >> 24) & 0xff; uint32_t z = (fg >> 16) & 0xff; uint32_t y = (fg >> 8) & 0xff; uint32_t x = (fg >> 0) & 0xff; +#endif float xf = (float)x / 255; /* R */ float yf = (float)y / 255; /* G */ float zf = (float)z / 255; /* B */ -- 1.8.3.2