diff options
author | marha <marha@users.sourceforge.net> | 2011-07-29 09:02:30 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-29 09:02:30 +0200 |
commit | 28257038c4f13ac26127d536c14c922aa036efed (patch) | |
tree | 12972a932e1c9f6cd4b3898dbc09cbf43bd16b0d /mesalib/src/mesa/drivers/common | |
parent | 01dc3700436c1fa006d38434e110b68b5d9702ce (diff) | |
download | vcxsrv-28257038c4f13ac26127d536c14c922aa036efed.tar.gz vcxsrv-28257038c4f13ac26127d536c14c922aa036efed.tar.bz2 vcxsrv-28257038c4f13ac26127d536c14c922aa036efed.zip |
libX11 mesa pixman git update 29 jul 2011
Diffstat (limited to 'mesalib/src/mesa/drivers/common')
-rw-r--r-- | mesalib/src/mesa/drivers/common/meta.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index 26c895196..f9b475598 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -2869,6 +2869,16 @@ copy_tex_sub_image(struct gl_context *ctx, /* Choose format/type for temporary image buffer */ format = _mesa_get_format_base_format(texImage->TexFormat); + if (format == GL_LUMINANCE || + format == GL_LUMINANCE_ALPHA || + format == GL_INTENSITY) { + /* We don't want to use GL_LUMINANCE, GL_INTENSITY, etc. for the + * temp image buffer because glReadPixels will do L=R+G+B which is + * not what we want (should be L=R). + */ + format = GL_RGBA; + } + type = get_temp_image_type(ctx, format); bpp = _mesa_bytes_per_pixel(format, type); if (bpp <= 0) { |