summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_readpix.c
diff options
context:
space:
mode:
authorjoukj <joukj@tarantella.(none)>2007-11-30 11:12:41 +0100
committerjoukj <joukj@tarantella.(none)>2007-11-30 11:12:41 +0100
commit86f3135fbd9db9ca08a6c0bfc620345c8a8e3f04 (patch)
tree586dca229d09fb523554dd07ad39c9bf422ab927 /src/mesa/swrast/s_readpix.c
parentd1414da8f9dbf3c27cf05509be51e8c70ed1185d (diff)
parentd2540e6d4bdcfcda195f6dcf43f75b810001c227 (diff)
Merge branch 'master' of git+ssh://joukj@git.freedesktop.org/git/mesa/mesa
Diffstat (limited to 'src/mesa/swrast/s_readpix.c')
-rw-r--r--src/mesa/swrast/s_readpix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index fe9a70f4ea..916ddc1b97 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
+ * Version: 7.0.3
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -129,7 +129,8 @@ read_depth_pixels( GLcontext *ctx,
rb->GetRow(ctx, rb, width, x, y, dest);
/* convert range from 24-bit to 32-bit */
for (k = 0; k < width; k++) {
- dest[k] = (dest[k] << 8) | (dest[k] >> 24);
+ /* Note: put MSByte of 24-bit value into LSByte */
+ dest[k] = (dest[k] << 8) | ((dest[k] >> 16) & 0xff);
}
}
}