summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstore.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-06-17 16:44:00 -0600
committerBrian Paul <[email protected]>2008-06-17 16:44:00 -0600
commitd2e0a11aab98764300b9019483dc701117be3fea (patch)
tree9de36c2ee27b9304a3db3e65de16a3ba5f767025 /src/mesa/main/texstore.c
parent47d046c93f7d6ea97feae193d201e74aebfd4394 (diff)
mesa: fix inconsistent use of GL_UNSIGNED_INT vs. GL_UNSIGNED_INT_24_8_EXT for Z unpacking
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r--src/mesa/main/texstore.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 2ac458b45fa..ec97a018004 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2320,6 +2320,8 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS)
GLboolean
_mesa_texstore_z24_s8(TEXSTORE_PARAMS)
{
+ const GLfloat depthScale = (GLfloat) 0xffffff;
+
ASSERT(dstFormat == &_mesa_texformat_z24_s8);
ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT);
ASSERT(srcType == GL_UNSIGNED_INT_24_8_EXT);
@@ -2356,9 +2358,9 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
GLint i;
/* the 24 depth bits will be in the high position: */
_mesa_unpack_depth_span(ctx, srcWidth,
- GL_UNSIGNED_INT, /* dst type */
+ GL_UNSIGNED_INT_24_8_EXT, /* dst type */
dstRow, /* dst addr */
- (GLfloat) 0xffffff, /* depthScale */
+ depthScale,
srcType, src, srcPacking);
/* get the 8-bit stencil values */
_mesa_unpack_stencil_span(ctx, srcWidth,