From: Xiang, Haihao Date: Thu, 4 Sep 2008 03:32:52 +0000 (+0800) Subject: mesa: merge stencil values into depth values for MESA_FORMAT_S8_Z24 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=218df7f9c53db90abf3a6590f77c8e9e49aeedf5;p=mesa.git mesa: merge stencil values into depth values for MESA_FORMAT_S8_Z24 --- diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 1efaf97fb69..e6eb1e2cd9b 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -2503,7 +2503,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 */ @@ -2517,7 +2517,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);