summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/osmesa/osmesa.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-08-07 00:45:07 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-08-07 00:45:07 +0000
commit77df88727cb0a423dd5cb41498c2302d9df4fce7 (patch)
tree98234cef23e87e196b3628095196daed47bf6dce /src/mesa/drivers/osmesa/osmesa.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/drivers/osmesa/osmesa.c')
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 8a80ab7597..51d6508283 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1,4 +1,4 @@
-/* $Id: osmesa.c,v 1.86 2002/07/09 01:22:51 brianp Exp $ */
+/* $Id: osmesa.c,v 1.87 2002/08/07 00:45:07 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1886,20 +1886,20 @@ static void smooth_rgba_z_triangle( GLcontext *ctx,
#define INTERP_ALPHA 1
#define RENDER_SPAN( span ) \
GLuint i; \
- GLchan *img = PIXELADDR4(span->x, span->y); \
- for (i = 0; i < span->end; i++, img += 4) { \
- const GLdepth z = FixedToDepth(span->z); \
+ GLchan *img = PIXELADDR4(span.x, span.y); \
+ for (i = 0; i < span.end; i++, img += 4) { \
+ const GLdepth z = FixedToDepth(span.z); \
if (z < zRow[i]) { \
- PACK_RGBA(img, FixedToChan(span->red), \
- FixedToChan(span->green), FixedToChan(span->blue), \
- FixedToChan(span->alpha)); \
+ PACK_RGBA(img, FixedToChan(span.red), \
+ FixedToChan(span.green), FixedToChan(span.blue), \
+ FixedToChan(span.alpha)); \
zRow[i] = z; \
} \
- span->red += span->redStep; \
- span->green += span->greenStep; \
- span->blue += span->blueStep; \
- span->alpha += span->alphaStep; \
- span->z += span->zStep; \
+ span.red += span.redStep; \
+ span.green += span.greenStep; \
+ span.blue += span.blueStep; \
+ span.alpha += span.alphaStep; \
+ span.z += span.zStep; \
}
#ifdef WIN32
@@ -1930,14 +1930,14 @@ static void flat_rgba_z_triangle( GLcontext *ctx,
#define RENDER_SPAN( span ) \
GLuint i; \
- GLuint *img = (GLuint *) PIXELADDR4(span->x, span->y); \
- for (i = 0; i < span->end; i++) { \
- const GLdepth z = FixedToDepth(span->z); \
+ GLuint *img = (GLuint *) PIXELADDR4(span.x, span.y); \
+ for (i = 0; i < span.end; i++) { \
+ const GLdepth z = FixedToDepth(span.z); \
if (z < zRow[i]) { \
img[i] = pixel; \
zRow[i] = z; \
} \
- span->z += span->zStep; \
+ span.z += span.zStep; \
}
#ifdef WIN32