summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2008-09-04 11:32:52 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2008-09-04 11:45:25 +0800
commit55e89eecff6a8dc0433eca16e2ea699ec9636d1b (patch)
treeaed02b8d6a1526d07f907ecdd3560db953c31efb
parent2c45b5575ad4396fa939ada1ccd977cad1b09f10 (diff)
mesa: merge stencil values into depth values for MESA_FORMAT_S8_Z24
Cherry-picked from master
-rw-r--r--src/mesa/main/texstore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index e821d9f367..0fd6a2daae 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2522,7 +2522,7 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
for (row = 0; row < srcHeight; row++) {
GLubyte stencil[MAX_WIDTH];
GLint i;
- /* the 24 depth bits will be in the high position: */
+ /* the 24 depth bits will be in the low position: */
_mesa_unpack_depth_span(ctx, srcWidth,
GL_UNSIGNED_INT, /* dst type */
dstRow, /* dst addr */
@@ -2536,7 +2536,7 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
ctx->_ImageTransferState);
/* merge stencil values into depth values */
for (i = 0; i < srcWidth; i++)
- dstRow[i] = stencil[i] << 24;
+ dstRow[i] |= stencil[i] << 24;
src += srcRowStride;
dstRow += dstRowStride / sizeof(GLuint);