diff options
author | marha <marha@users.sourceforge.net> | 2012-08-16 14:48:54 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-16 14:48:54 +0200 |
commit | 4aac32998c2b173b84aec0b020aa086fef4b1423 (patch) | |
tree | 3ffcb971bcc2f01929f60f8f704996544b69b2e1 /mesalib/src/mesa/main/texgetimage.c | |
parent | 9ddf44af81782451cee798e06749ce3067a14a41 (diff) | |
download | vcxsrv-4aac32998c2b173b84aec0b020aa086fef4b1423.tar.gz vcxsrv-4aac32998c2b173b84aec0b020aa086fef4b1423.tar.bz2 vcxsrv-4aac32998c2b173b84aec0b020aa086fef4b1423.zip |
libxcb xserver mesa git update 16 Aug 2012
Diffstat (limited to 'mesalib/src/mesa/main/texgetimage.c')
-rw-r--r-- | mesalib/src/mesa/main/texgetimage.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c index 0ba3ff5b3..4cd87c645 100644 --- a/mesalib/src/mesa/main/texgetimage.c +++ b/mesalib/src/mesa/main/texgetimage.c @@ -306,7 +306,8 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions, GLuint img, row; GLfloat (*rgba)[4]; GLuint (*rgba_uint)[4]; - GLboolean is_integer = _mesa_is_format_integer_color(texImage->TexFormat); + GLboolean tex_is_integer = _mesa_is_format_integer_color(texImage->TexFormat); + GLboolean tex_is_uint = _mesa_is_format_unsigned(texImage->TexFormat); /* Allocate buffer for one row of texels */ rgba = (GLfloat (*)[4]) malloc(4 * width * sizeof(GLfloat)); @@ -358,12 +359,19 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions, width, height, format, type, img, row, 0); - if (is_integer) { + if (tex_is_integer) { _mesa_unpack_uint_rgba_row(texFormat, width, src, rgba_uint); if (rebaseFormat) _mesa_rebase_rgba_uint(width, rgba_uint, rebaseFormat); - _mesa_pack_rgba_span_int(ctx, width, rgba_uint, - format, type, dest); + if (tex_is_uint) { + _mesa_pack_rgba_span_from_uints(ctx, width, + (GLuint (*)[4]) rgba_uint, + format, type, dest); + } else { + _mesa_pack_rgba_span_from_ints(ctx, width, + (GLint (*)[4]) rgba_uint, + format, type, dest); + } } else { _mesa_unpack_rgba_row(texFormat, width, src, rgba); if (rebaseFormat) |