mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 17:30:29 +01:00
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 <jfonseca@vmware.com>
(cherry picked from commit ad897fff77)
This commit is contained in:
parent
8836517250
commit
83728cf4ce
1 changed files with 4 additions and 0 deletions
|
|
@ -284,10 +284,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue