diff options
author | Brian <[email protected]> | 2007-10-13 09:05:20 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-13 09:05:20 -0600 |
commit | eb389aaf720a08045bc2492dd6cf50f1a2e44e87 (patch) | |
tree | 9e3fb6c7c8ec79524a9090dee9b8761cf53a9c5e /src | |
parent | a1e332950bf5f6460af81ad29f5917c84649f249 (diff) |
get_tile() of Z surfaces returns floats now
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_cb_readpixels.c | 14 |
1 files changed, 1 insertions, 13 deletions
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, |