summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrianp <brianp>2001-03-05 23:06:47 +0000
committerbrianp <brianp>2001-03-05 23:06:47 +0000
commit2819b0e7e1edccbc3ff52b4b90241ac94f78d1e9 (patch)
tree6bac49a3d93c361524b1cebf3585e1984c26f55f
parent4efca693d8d5b653c1dd2a62a995b6ef68393925 (diff)
call i810DmaFinish() in HW_LOCK(). Fixed READ_RGBA to return properly scaled values.tdfx-3-1-0-20010306-freeze
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/i810span.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xc/lib/GL/mesa/src/drv/i810/i810span.c b/xc/lib/GL/mesa/src/drv/i810/i810span.c
index 88b5f9236..ca9817b8a 100644
--- a/xc/lib/GL/mesa/src/drv/i810/i810span.c
+++ b/xc/lib/GL/mesa/src/drv/i810/i810span.c
@@ -51,6 +51,7 @@
#define HW_LOCK() \
i810ContextPtr imesa = I810_CONTEXT(ctx); \
FLUSH_BATCH(imesa); \
+ i810DmaFinish(imesa); \
LOCK_HARDWARE_QUIESCENT(imesa);
#define HW_CLIPLOOP() \
@@ -86,9 +87,9 @@
#define READ_RGBA( rgba, _x, _y ) \
do { \
GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \
- rgba[0] = (p >> 8) & 0xf8; \
- rgba[1] = (p >> 3) & 0xfc; \
- rgba[2] = (p << 3) & 0xf8; \
+ rgba[0] = (((p >> 11) & 0x1f) * 255) / 31; \
+ rgba[1] = (((p >> 5) & 0x3f) * 255) / 63; \
+ rgba[2] = (((p >> 0) & 0x1f) * 255) / 31; \
rgba[3] = 255; \
} while(0)