projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46e03d5
)
improve 24-bit Z to 32-bit Z conversion
author
Brian
<brian.paul@tungstengraphics.com>
Mon, 26 Nov 2007 16:35:39 +0000
(09:35 -0700)
committer
Brian
<brian.paul@tungstengraphics.com>
Tue, 27 Nov 2007 17:31:55 +0000
(10:31 -0700)
src/mesa/swrast/s_readpix.c
patch
|
blob
|
history
diff --git
a/src/mesa/swrast/s_readpix.c
b/src/mesa/swrast/s_readpix.c
index fe9a70f4eae03932dc91a58be33e373c479c8f37..916ddc1b97392f96b1f484e8528ac5eb127847aa 100644
(file)
--- 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);
}
}
}