On Mon, Dec 12, 2011 at 10:38 AM, Eric Anholt <e...@anholt.net> wrote: > On Sat, 10 Dec 2011 12:00:53 -0700, Brian Paul <bri...@vmware.com> wrote: >> - /* Note that masking will change the color values, but only the >> - * channels for which the write mask is GL_FALSE. The channels >> - * which which are write-enabled won't get modified. >> - */ >> - for (i = 0; i < height; i++) { >> - span.x = x; >> - span.y = y + i; >> - _swrast_mask_rgba_span(ctx, rb, &span, buf); >> - /* write masked row */ >> - rb->PutRow(ctx, rb, width, x, y + i, span.array->rgba, NULL); >> + if (doMasking) { >> + /* Convert the boolean mask to a color */ > > I think this would be more informative as > > /* Convert the boolean mask to a color value that will be packed to > * produce the bitmask for the renderbuffer's format. > */ > > but overall, this looks like a pretty nice (if tricky) way to handle all > these formats. Reviewed-by: Eric Anholt <e...@anholt.net>
Actually, I found a couple issues with the code when I was looking at it yesterday. I'll post an updated patch later. I'll update the comments too. -Brian _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev