On Thu, 29 Sep 2011 20:22:28 -0600, Brian Paul <brian.e.p...@gmail.com> wrote: > From: Brian Paul <bri...@vmware.com> > > The GL spec says that luminance values are returned as (l, 0, 0, 1), > L/A values as (l, 0, 0, a) and intensity values as (i, 0, 0, 1). > Use the pixel transfer scale controls to implement that. > This fixes a few failures in the new piglit getteximage-formats > test when getting a compressed L or L/A image. > --- > src/mesa/drivers/common/meta.c | 24 ++++++++++++++++++++++-- > src/mesa/main/pixel.c | 2 +- > src/mesa/main/pixel.h | 9 +++++++++ > 3 files changed, 32 insertions(+), 3 deletions(-) > > diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c > index 0291368..148097a 100644 > --- a/src/mesa/drivers/common/meta.c > +++ b/src/mesa/drivers/common/meta.c > @@ -49,6 +49,7 @@ > #include "main/macros.h" > #include "main/matrix.h" > #include "main/mipmap.h" > +#include "main/pixel.h" > #include "main/pbo.h" > #include "main/polygon.h" > #include "main/readpix.h" > @@ -3235,8 +3236,27 @@ decompress_texture_image(struct gl_context *ctx, > } > > /* read pixels from renderbuffer */ > - ctx->Pack.RowLength = destRowLength; > - _mesa_ReadPixels(0, 0, width, height, destFormat, destType, dest); > + { > + GLenum baseTexFormat = _mesa_base_tex_format(ctx, > texImage->InternalFormat);
(aka texImage->_BaseFormat) Looks fine. I'm not really into the indenting of blocks like this for non-control-flow, but no substantive complaints.
pgp9NgcIobfBI.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev