From 77df88727cb0a423dd5cb41498c2302d9df4fce7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 Aug 2002 00:45:07 +0000 Subject: struct sw_span is again allocated on the stack, but the arrays of span data are broken out into a new struct span_arrays which is allocated per-context (to avoid huge stack allocations - a problem on Windows). This lets us use span.redStep instead of span->redStep (for example) to hopefully get slightly better performance in the triangle functions. --- src/mesa/swrast/s_masking.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/mesa/swrast/s_masking.c') diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c index 00995cf997..7e0adc42d3 100644 --- a/src/mesa/swrast/s_masking.c +++ b/src/mesa/swrast/s_masking.c @@ -1,4 +1,4 @@ -/* $Id: s_masking.c,v 1.7 2002/02/02 21:40:33 brianp Exp $ */ +/* $Id: s_masking.c,v 1.8 2002/08/07 00:45:07 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -65,11 +65,11 @@ _mesa_mask_rgba_span( GLcontext *ctx, const struct sw_span *span, ASSERT(span->arrayMask & SPAN_RGBA); if (span->arrayMask & SPAN_XY) { - (*swrast->Driver.ReadRGBAPixels)(ctx, n, span->xArray, span->yArray, - dest, span->mask); + (*swrast->Driver.ReadRGBAPixels)(ctx, n, span->array->x, span->array->y, + dest, span->array->mask); if (SWRAST_CONTEXT(ctx)->_RasterMask & ALPHABUF_BIT) { - _mesa_read_alpha_pixels(ctx, n, span->xArray, span->yArray, - dest, span->mask ); + _mesa_read_alpha_pixels(ctx, n, span->array->x, span->array->y, + dest, span->array->mask); } } else { @@ -150,8 +150,9 @@ _mesa_mask_index_span( GLcontext *ctx, const struct sw_span *span, if (span->arrayMask & SPAN_XY) { - (*swrast->Driver.ReadCI32Pixels)(ctx, span->end, span->xArray, - span->yArray, fbindexes, span->mask); + (*swrast->Driver.ReadCI32Pixels)(ctx, span->end, span->array->x, + span->array->y, fbindexes, + span->array->mask); for (i = 0; i < span->end; i++) { index[i] = (index[i] & msrc) | (fbindexes[i] & mdest); -- cgit v1.2.3