aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_masking.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-08-07 00:45:07 +0000
committerBrian Paul <[email protected]>2002-08-07 00:45:07 +0000
commit77df88727cb0a423dd5cb41498c2302d9df4fce7 (patch)
tree98234cef23e87e196b3628095196daed47bf6dce /src/mesa/swrast/s_masking.c
parent2353e96c320d4bd26d10dc29b57df3e9f882e6d3 (diff)
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.
Diffstat (limited to 'src/mesa/swrast/s_masking.c')
-rw-r--r--src/mesa/swrast/s_masking.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c
index 00995cf997a..7e0adc42d35 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);