From: Brian Paul Date: Tue, 17 Jun 2008 22:44:04 +0000 (-0600) Subject: mesa: fix inconsistent use of GL_UNSIGNED_INT vs. GL_UNSIGNED_INT_24_8_EXT for Z... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=30640695400b9b27656893753ae6b62f2082ce9b;p=mesa.git mesa: fix inconsistent use of GL_UNSIGNED_INT vs. GL_UNSIGNED_INT_24_8_EXT for Z unpacking --- diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 347cec66ef4..8034daecae2 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -3963,7 +3963,7 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, DEPTH_VALUES(GLuint, UINT_TO_FLOAT); break; case GL_UNSIGNED_INT_24_8_EXT: /* GL_EXT_packed_depth_stencil */ - if (dstType == GL_UNSIGNED_INT && + if (dstType == GL_UNSIGNED_INT_24_8_EXT && depthMax == 0xffffff && ctx->Pixel.DepthScale == 1.0 && ctx->Pixel.DepthBias == 0.0) { diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 5363e9e0801..89774291f2f 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -2322,7 +2322,7 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS) GLboolean _mesa_texstore_z24_s8(TEXSTORE_PARAMS) { - const GLuint depthScale = 0xffffff; + const GLfloat depthScale = (GLfloat) 0xffffff; ASSERT(dstFormat == &_mesa_texformat_z24_s8); ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT); @@ -2360,7 +2360,7 @@ _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 */ depthScale, srcType, src, srcPacking);