get_tile() of Z surfaces returns floats now

This commit is contained in:
Brian
2007-10-13 09:05:20 -06:00
parent a1e332950b
commit eb389aaf72

View File

@@ -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,