summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-11-17 19:41:29 +0100
committerMichel Dänzer <[email protected]>2009-11-17 19:41:29 +0100
commit52be96b7feb23d9d502c74c4de52dadfb546dc82 (patch)
tree5c794ce7f9222455522f1250893592294446812d /src/mesa/drivers
parent63bc736f90e044bdd681d56300e8342582c5a93a (diff)
Remove unconditional use of glibc specific bswap_16() macro.
Fixes unresolved symbol bswap_16 on non-glibc or little endian glibc platforms.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/common/spantmp2.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/common/spantmp2.h b/src/mesa/drivers/dri/common/spantmp2.h
index dd5e29f8ce6..95f97414a98 100644
--- a/src/mesa/drivers/dri/common/spantmp2.h
+++ b/src/mesa/drivers/dri/common/spantmp2.h
@@ -107,7 +107,8 @@
#define READ_RGBA( rgba, _x, _y ) \
do { \
- GLushort p = bswap_16(GET_VALUE(_x, _y)); \
+ GLushort p = GET_VALUE(_x, _y); \
+ p = p << 8 | p >> 8; \
rgba[0] = ((p >> 8) & 0xf8) * 255 / 0xf8; \
rgba[1] = ((p >> 3) & 0xfc) * 255 / 0xfc; \
rgba[2] = ((p << 3) & 0xf8) * 255 / 0xf8; \
@@ -237,7 +238,8 @@
#define READ_RGBA( rgba, _x, _y ) \
do { \
- GLushort p = bswap_16(GET_VALUE(_x, _y)); \
+ GLushort p = GET_VALUE(_x, _y); \
+ p = p << 8 | p >> 8; \
rgba[0] = ((p >> 7) & 0xf8) * 255 / 0xf8; \
rgba[1] = ((p >> 2) & 0xf8) * 255 / 0xf8; \
rgba[2] = ((p << 3) & 0xf8) * 255 / 0xf8; \