summaryrefslogtreecommitdiff
path: root/src/mesa/main/texstore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r--src/mesa/main/texstore.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 39f9d1ddb0..57419aa2f3 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2507,8 +2507,7 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
dstRow += dstRowStride / sizeof(GLuint);
}
}
- }
- else {
+ } else {
for (img = 0; img < srcDepth; img++) {
GLuint *dstRow = (GLuint *) dstAddr
+ dstImageOffsets[dstZoffset + img]
@@ -2522,7 +2521,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 +2535,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);