diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2013-03-07 09:59:29 +0100 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2013-03-07 14:48:23 +0100 |
commit | 96ddc91bfa07d91b412afcf90e13523fe9efaf08 (patch) | |
tree | 836f46fde0dea6d31831a3db5879e675fa348e96 | |
parent | 6a60fcdf060a0f553d8d4f7939c2a05aa04bedfa (diff) |
UMS: Swap bytes when uploading to pixmap for solid picture on big endian hostums
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57649
-rw-r--r-- | src/radeon_exa_shared.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c index b83eb81c..65048e7a 100644 --- a/src/radeon_exa_shared.c +++ b/src/radeon_exa_shared.c @@ -40,6 +40,7 @@ #endif #include "radeon_macros.h" #include "radeon_probe.h" +#include "radeon_reg.h" #include "radeon_version.h" #include "radeon_vbo.h" @@ -159,6 +160,17 @@ PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid) /* XXX: Big hammer... */ info->accel_state->exa->WaitMarker(pScreen, info->accel_state->exaSyncMarker); + +#if X_BYTE_ORDER == X_BIG_ENDIAN + if (pScrn->bitsPerPixel == 32) + RADEONCopySwap(info->FB + exaGetPixmapOffset(pPix), (uint8_t*)&solid, 4, + RADEON_HOST_DATA_SWAP_32BIT); + else if (pScrn->bitsPerPixel == 16) + RADEONCopySwap(info->FB + exaGetPixmapOffset(pPix), (uint8_t*)&solid, 4, + RADEON_HOST_DATA_SWAP_16BIT); + else + /* Fall through for 8 bpp */ +#endif memcpy(info->FB + exaGetPixmapOffset(pPix), &solid, 4); return pPix; |