diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 4b0ee798691..f3f92836f3f 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -4900,7 +4900,7 @@ _mesa_unpack_depth_span( struct gl_context *ctx, GLuint n, else { /* need to use double precision to prevent overflow problems */ for (i = 0; i < n; i++) { - GLdouble z = depthValues[i] * (GLfloat) depthMax; + GLdouble z = depthValues[i] * (GLdouble) depthMax; if (z >= (GLdouble) 0xffffffff) zValues[i] = 0xffffffff; else