Doug Morgan wrote: > > Hello, > > In Mesa-3.0, glReadPixels doesn't always return the correct alpha values. The > bug is related to read_fast_rgba_pixels(). In cases where > (*ctx->Driver.ReadRGBASpan) calls read_color_span, the final returned alpha > values are all 255, even if there is a local enabled alpha buffer with other > values. I think a fix might be to in readpix.c change line 507 and beyond from: > > for (row=0; row<readHeight; row++) { > (*ctx->Driver.ReadRGBASpan)(ctx, readWidth, srcX, srcY, > (void *) dest); > dest += rowLength * 4; > srcY++; > } > > to: > for (row=0; row<readHeight; row++) { > (*ctx->Driver.ReadRGBASpan)(ctx, readWidth, srcX, srcY, > (void *) dest); > if (ctx->RasterMask & ALPHABUF_BIT) { > gl_read_alpha_span( ctx, readWidth, srcX, srcY, dest ); > } > dest += rowLength * 4; > srcY++; > } Thanks for the patch and test program. I've commited a fix for this for Mesa 3.1 (and 3.3). -Brian _______________________________________________ Mesa-dev maillist - [EMAIL PROTECTED] http://lists.mesa3d.org/mailman/listinfo/mesa-dev