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_context.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mesa/swrast/s_context.h') diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index 900c1907f6..a2c14f07a7 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -1,4 +1,4 @@ -/* $Id: s_context.h,v 1.18 2002/05/02 00:59:20 brianp Exp $ */ +/* $Id: s_context.h,v 1.19 2002/08/07 00:45:07 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -170,7 +170,13 @@ typedef struct swrast_tri_func SpecTriangle; /*@}*/ - struct sw_span *span; + /** + * Typically, we'll allocate a sw_span structure as a local variable + * and set its 'array' pointer to point to this object. The reason is + * this object is big and causes problems when allocated on the stack + * on some systems. + */ + struct span_arrays *span_data; /** Internal hooks, kept uptodate by the same mechanism as above. */ -- cgit v1.2.3