diff options
author | Brian Paul <[email protected]> | 2012-02-29 20:55:50 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-03-08 20:10:53 -0700 |
commit | ad897fff7730298c21289768d9b1b55f3d166ac5 (patch) | |
tree | b5cda9d6fa4f16bd5d2d8fac55fc42bc167d44a1 /src | |
parent | 774c4027651436451b3486f62b9a8903f29a715b (diff) |
mesa: use _mesa_rebase_rgba_float/uint() in glReadPixels code
See the comments for _mesa_rebase_rgba_float() for details.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=46679
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/readpix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 3384d8a3824..4918549556f 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -291,10 +291,14 @@ slow_read_rgba_pixels( struct gl_context *ctx, for (j = 0; j < height; j++) { if (_mesa_is_integer_format(format)) { _mesa_unpack_uint_rgba_row(rbFormat, width, map, (GLuint (*)[4]) rgba); + _mesa_rebase_rgba_uint(width, (GLuint (*)[4]) rgba, + rb->_BaseFormat); _mesa_pack_rgba_span_int(ctx, width, (GLuint (*)[4]) rgba, format, type, dst); } else { _mesa_unpack_rgba_row(rbFormat, width, map, (GLfloat (*)[4]) rgba); + _mesa_rebase_rgba_float(width, (GLfloat (*)[4]) rgba, + rb->_BaseFormat); _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, format, type, dst, packing, transferOps); } |