From: Brian Date: Sat, 13 Oct 2007 15:05:20 +0000 (-0600) Subject: get_tile() of Z surfaces returns floats now X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb389aaf720a08045bc2492dd6cf50f1a2e44e87;p=mesa.git get_tile() of Z surfaces returns floats now --- diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index a82c4e526aa..35cf64bae29 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -136,20 +136,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLvoid *dst = _mesa_image_address2d(&clippedPacking, dest, width, height, format, type, i, 0); if (format == GL_DEPTH_COMPONENT) { - float z[MAX_WIDTH]; - if (strb->surface->format == PIPE_FORMAT_S8_Z24) { - const double scale = 1.0 / ((1 << 24) - 1); - const uint *zs = (const uint *) temp; - uint k; - for (k = 0; k < width; k++) { - z[k] = (zs[k] & 0xffffff) * scale; - } - } - else { - assert(0); - } _mesa_pack_depth_span(ctx, width, dst, type, - z, &clippedPacking); + (GLfloat *) temp, &clippedPacking); } else { _mesa_pack_rgba_span_float(ctx, width, temp, format, type, dst,