From: Brian Paul Date: Tue, 25 Mar 2003 02:23:44 +0000 (+0000) Subject: replace _mesa_ prefix with _swrast_, remove s_histogram.[ch] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45bc887da226403f2c41077e40ca38b6f60f1359;p=mesa.git replace _mesa_ prefix with _swrast_, remove s_histogram.[ch] --- diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index 9850ff9ac5a..13a825e7c00 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -1,4 +1,4 @@ -/* $Id: s_aalinetemp.h,v 1.23 2003/03/04 16:34:02 brianp Exp $ */ +/* $Id: s_aalinetemp.h,v 1.24 2003/03/25 02:23:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -101,11 +101,11 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) if (line->span.end == MAX_WIDTH) { #if defined(DO_TEX) || defined(DO_MULTITEX) - _mesa_write_texture_span(ctx, &(line->span)); + _swrast_write_texture_span(ctx, &(line->span)); #elif defined(DO_RGBA) - _mesa_write_rgba_span(ctx, &(line->span)); + _swrast_write_rgba_span(ctx, &(line->span)); #else - _mesa_write_index_span(ctx, &(line->span)); + _swrast_write_index_span(ctx, &(line->span)); #endif line->span.end = 0; /* reset counter */ } @@ -294,11 +294,11 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) } #if defined(DO_TEX) || defined(DO_MULTITEX) - _mesa_write_texture_span(ctx, &(line.span)); + _swrast_write_texture_span(ctx, &(line.span)); #elif defined(DO_RGBA) - _mesa_write_rgba_span(ctx, &(line.span)); + _swrast_write_rgba_span(ctx, &(line.span)); #else - _mesa_write_index_span(ctx, &(line.span)); + _swrast_write_index_span(ctx, &(line.span)); #endif } diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c index 7b41573a4ee..b717ee77741 100644 --- a/src/mesa/swrast/s_aatriangle.c +++ b/src/mesa/swrast/s_aatriangle.c @@ -1,4 +1,4 @@ -/* $Id: s_aatriangle.c,v 1.30 2003/03/01 01:50:25 brianp Exp $ */ +/* $Id: s_aatriangle.c,v 1.31 2003/03/25 02:23:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -461,7 +461,7 @@ spec_multitex_aa_tri(GLcontext *ctx, * appropriate antialiased triangle rasterizer function. */ void -_mesa_set_aa_triangle_function(GLcontext *ctx) +_swrast_set_aa_triangle_function(GLcontext *ctx) { ASSERT(ctx->Polygon.SmoothFlag); diff --git a/src/mesa/swrast/s_aatriangle.h b/src/mesa/swrast/s_aatriangle.h index 0e25414e65d..af723086d41 100644 --- a/src/mesa/swrast/s_aatriangle.h +++ b/src/mesa/swrast/s_aatriangle.h @@ -1,4 +1,4 @@ -/* $Id: s_aatriangle.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */ +/* $Id: s_aatriangle.h,v 1.4 2003/03/25 02:23:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,7 +34,7 @@ extern void -_mesa_set_aa_triangle_function(GLcontext *ctx); +_swrast_set_aa_triangle_function(GLcontext *ctx); #endif diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h index 1b4df753719..0ffba71f3e3 100644 --- a/src/mesa/swrast/s_aatritemp.h +++ b/src/mesa/swrast/s_aatritemp.h @@ -1,4 +1,4 @@ -/* $Id: s_aatritemp.h,v 1.35 2003/02/21 21:00:20 brianp Exp $ */ +/* $Id: s_aatritemp.h,v 1.36 2003/03/25 02:23:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -350,11 +350,11 @@ span.end = (GLuint) ix - (GLuint) startX; ASSERT(span.interpMask == 0); #if defined(DO_MULTITEX) || defined(DO_TEX) - _mesa_write_texture_span(ctx, &span); + _swrast_write_texture_span(ctx, &span); #elif defined(DO_RGBA) - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); #elif defined(DO_INDEX) - _mesa_write_index_span(ctx, &span); + _swrast_write_index_span(ctx, &span); #endif } } @@ -511,11 +511,11 @@ span.end = n; ASSERT(span.interpMask == 0); #if defined(DO_MULTITEX) || defined(DO_TEX) - _mesa_write_texture_span(ctx, &span); + _swrast_write_texture_span(ctx, &span); #elif defined(DO_RGBA) - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); #elif defined(DO_INDEX) - _mesa_write_index_span(ctx, &span); + _swrast_write_index_span(ctx, &span); #endif } } diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index 2af2714bd67..0dfe93bb6bd 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -1,4 +1,4 @@ -/* $Id: s_accum.c,v 1.21 2003/03/01 01:50:25 brianp Exp $ */ +/* $Id: s_accum.c,v 1.22 2003/03/25 02:23:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -67,7 +67,7 @@ void -_mesa_alloc_accum_buffer( GLframebuffer *buffer ) +_swrast_alloc_accum_buffer( GLframebuffer *buffer ) { GET_CURRENT_CONTEXT(ctx); GLint n; @@ -130,7 +130,7 @@ static void rescale_accum( GLcontext *ctx ) * Clear the accumulation Buffer. */ void -_mesa_clear_accum_buffer( GLcontext *ctx ) +_swarst_clear_accum_buffer( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); GLuint buffersize; @@ -325,7 +325,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, for (j = 0; j < height; j++) { GLint i, i4; - _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _swrast_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i = i4 = 0; i < width; i++, i4+=4) { acc[i4+0] += rgba[i][RCOMP]; acc[i4+1] += rgba[i][GCOMP]; @@ -346,7 +346,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, for (j=0;jDrawBuffer->Accum + ypos * width4 + xpos * 4; GLint i; - _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _swrast_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i=0;i_IntegerAccumScaler <= 1.0); for (j = 0; j < height; j++) { GLint i, i4; - _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _swrast_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i = i4 = 0; i < width; i++, i4 += 4) { acc[i4+0] = rgba[i][RCOMP]; acc[i4+1] = rgba[i][GCOMP]; @@ -412,7 +412,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, GLint i, j; for (j = 0; j < height; j++) { GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4; - _mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); + _swrast_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba); for (i=0;iDriver.WriteRGBASpan)( ctx, width, xpos, ypos, (const GLchan (*)[4])rgba, NULL ); if (ctx->DrawBuffer->UseSoftwareAlphaBuffers && ctx->Color.ColorMask[ACOMP]) { - _mesa_write_alpha_span(ctx, width, xpos, ypos, + _swrast_write_alpha_span(ctx, width, xpos, ypos, (CONST GLchan (*)[4]) rgba, NULL); } ypos++; @@ -507,13 +507,13 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, rgba[i][ACOMP] = CLAMP( a, 0, CHAN_MAX ); } if (colorMask != 0xffffffff) { - _mesa_mask_rgba_array( ctx, width, xpos, ypos, rgba ); + _swrast_mask_rgba_array( ctx, width, xpos, ypos, rgba ); } (*swrast->Driver.WriteRGBASpan)( ctx, width, xpos, ypos, (const GLchan (*)[4])rgba, NULL ); if (ctx->DrawBuffer->UseSoftwareAlphaBuffers && ctx->Color.ColorMask[ACOMP]) { - _mesa_write_alpha_span(ctx, width, xpos, ypos, + _swrast_write_alpha_span(ctx, width, xpos, ypos, (CONST GLchan (*)[4]) rgba, NULL); } ypos++; diff --git a/src/mesa/swrast/s_accum.h b/src/mesa/swrast/s_accum.h index d46235d5e3e..62b11825d4e 100644 --- a/src/mesa/swrast/s_accum.h +++ b/src/mesa/swrast/s_accum.h @@ -1,4 +1,4 @@ -/* $Id: s_accum.h,v 1.4 2002/03/16 00:53:15 brianp Exp $ */ +/* $Id: s_accum.h,v 1.5 2003/03/25 02:23:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,11 +34,11 @@ extern void -_mesa_alloc_accum_buffer( GLframebuffer *buffer ); +_swrast_alloc_accum_buffer( GLframebuffer *buffer ); extern void -_mesa_clear_accum_buffer( GLcontext *ctx ); +_swarst_clear_accum_buffer( GLcontext *ctx ); #endif diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c index 35ec7e9dcce..9ad3ea3b127 100644 --- a/src/mesa/swrast/s_alpha.c +++ b/src/mesa/swrast/s_alpha.c @@ -1,4 +1,4 @@ -/* $Id: s_alpha.c,v 1.13 2003/03/01 01:50:25 brianp Exp $ */ +/* $Id: s_alpha.c,v 1.14 2003/03/25 02:23:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -39,14 +39,14 @@ /** - * \fn GLint _mesa_alpha_test( const GLcontext *ctx, struct sw_span *span ) + * \fn GLint _swrast_alpha_test( const GLcontext *ctx, struct sw_span *span ) * \brief Apply the alpha test to a span of pixels. * \return * - "0" = all pixels in the span failed the alpha test. * - "1" = one or more pixels passed the alpha test. */ GLint -_mesa_alpha_test( const GLcontext *ctx, struct sw_span *span ) +_swrast_alpha_test( const GLcontext *ctx, struct sw_span *span ) { const GLchan (*rgba)[4] = (const GLchan (*)[4]) span->array->rgba; GLchan ref; @@ -91,7 +91,7 @@ _mesa_alpha_test( const GLcontext *ctx, struct sw_span *span ) span->writeAll = GL_FALSE; return 0; default: - _mesa_problem( ctx, "Invalid alpha test in _mesa_alpha_test" ); + _mesa_problem( ctx, "Invalid alpha test in _swrast_alpha_test" ); return 0; } } diff --git a/src/mesa/swrast/s_alpha.h b/src/mesa/swrast/s_alpha.h index 413babb3e99..cf69223b9ed 100644 --- a/src/mesa/swrast/s_alpha.h +++ b/src/mesa/swrast/s_alpha.h @@ -1,4 +1,4 @@ -/* $Id: s_alpha.h,v 1.7 2003/02/23 04:10:54 brianp Exp $ */ +/* $Id: s_alpha.h,v 1.8 2003/03/25 02:23:44 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,7 +34,7 @@ extern GLint -_mesa_alpha_test( const GLcontext *ctx, struct sw_span *span ); +_swrast_alpha_test( const GLcontext *ctx, struct sw_span *span ); #endif diff --git a/src/mesa/swrast/s_alphabuf.c b/src/mesa/swrast/s_alphabuf.c index 0c82055721c..31812769d5c 100644 --- a/src/mesa/swrast/s_alphabuf.c +++ b/src/mesa/swrast/s_alphabuf.c @@ -1,4 +1,4 @@ -/* $Id: s_alphabuf.c,v 1.16 2002/11/26 02:58:43 brianp Exp $ */ +/* $Id: s_alphabuf.c,v 1.17 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -44,7 +44,7 @@ * Allocate a new front and back alpha buffer. */ void -_mesa_alloc_alpha_buffers( GLframebuffer *buffer ) +_swrast_alloc_alpha_buffers( GLframebuffer *buffer ) { const GLint bytes = buffer->Width * buffer->Height * sizeof(GLchan); @@ -102,7 +102,7 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer ) * Clear all the alpha buffers */ void -_mesa_clear_alpha_buffers( GLcontext *ctx ) +_swrast_clear_alpha_buffers( GLcontext *ctx ) { GLchan aclear; GLuint bufferBit; @@ -198,7 +198,7 @@ GLchan *get_alpha_buffer( GLcontext *ctx ) void -_mesa_write_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, +_swrast_write_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, CONST GLchan rgba[][4], const GLubyte mask[] ) { GLchan *buffer, *aptr; @@ -224,7 +224,7 @@ _mesa_write_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, void -_mesa_write_mono_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, +_swrast_write_mono_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, GLchan alpha, const GLubyte mask[] ) { GLchan *buffer, *aptr; @@ -250,7 +250,7 @@ _mesa_write_mono_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, void -_mesa_write_alpha_pixels( GLcontext *ctx, +_swrast_write_alpha_pixels( GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], CONST GLchan rgba[][4], const GLubyte mask[] ) { @@ -277,7 +277,7 @@ _mesa_write_alpha_pixels( GLcontext *ctx, void -_mesa_write_mono_alpha_pixels( GLcontext *ctx, +_swrast_write_mono_alpha_pixels( GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLchan alpha, const GLubyte mask[] ) { @@ -305,7 +305,7 @@ _mesa_write_mono_alpha_pixels( GLcontext *ctx, void -_mesa_read_alpha_span( GLcontext *ctx, +_swrast_read_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, GLchan rgba[][4] ) { const GLchan *buffer, *aptr; @@ -320,7 +320,7 @@ _mesa_read_alpha_span( GLcontext *ctx, void -_mesa_read_alpha_pixels( GLcontext *ctx, +_swrast_read_alpha_pixels( GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLchan rgba[][4], const GLubyte mask[] ) { diff --git a/src/mesa/swrast/s_alphabuf.h b/src/mesa/swrast/s_alphabuf.h index 544ae070b16..d74db0114b3 100644 --- a/src/mesa/swrast/s_alphabuf.h +++ b/src/mesa/swrast/s_alphabuf.h @@ -1,4 +1,4 @@ -/* $Id: s_alphabuf.h,v 1.4 2002/03/16 00:53:15 brianp Exp $ */ +/* $Id: s_alphabuf.h,v 1.5 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,46 +34,46 @@ extern void -_mesa_alloc_alpha_buffers( GLframebuffer *buffer ); +_swrast_alloc_alpha_buffers( GLframebuffer *buffer ); extern void -_mesa_clear_alpha_buffers( GLcontext *ctx ); +_swrast_clear_alpha_buffers( GLcontext *ctx ); extern void -_mesa_write_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, +_swrast_write_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, CONST GLchan rgba[][4], const GLubyte mask[] ); extern void -_mesa_write_mono_alpha_span( GLcontext *ctx, +_swrast_write_mono_alpha_span( GLcontext *ctx, GLuint n, GLint x, GLint y, GLchan alpha, const GLubyte mask[] ); extern void -_mesa_write_alpha_pixels( GLcontext* ctx, +_swrast_write_alpha_pixels( GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], CONST GLchan rgba[][4], const GLubyte mask[] ); extern void -_mesa_write_mono_alpha_pixels( GLcontext* ctx, +_swrast_write_mono_alpha_pixels( GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLchan alpha, const GLubyte mask[] ); extern void -_mesa_read_alpha_span( GLcontext* ctx, +_swrast_read_alpha_span( GLcontext* ctx, GLuint n, GLint x, GLint y, GLchan rgba[][4] ); extern void -_mesa_read_alpha_pixels( GLcontext* ctx, +_swrast_read_alpha_pixels( GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLchan rgba[][4], const GLubyte mask[] ); diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index 49cc59ceefc..f8fc0710994 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -1,4 +1,4 @@ -/* $Id: s_bitmap.c,v 1.21 2003/03/01 01:50:25 brianp Exp $ */ +/* $Id: s_bitmap.c,v 1.22 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -79,11 +79,11 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, } if (ctx->Depth.Test) - _mesa_span_default_z(ctx, &span); + _swrast_span_default_z(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); if (ctx->Texture._EnabledUnits) - _mesa_span_default_texcoords(ctx, &span); + _swrast_span_default_texcoords(ctx, &span); for (row = 0; row < height; row++, span.y++) { const GLubyte *src = (const GLubyte *) _mesa_image_address( unpack, @@ -138,9 +138,9 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, /* flush the span */ span.end = count; if (ctx->Visual.rgbMode) - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); else - _mesa_write_index_span(ctx, &span); + _swrast_write_index_span(ctx, &span); span.end = 0; count = 0; } @@ -195,11 +195,11 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, } if (ctx->Depth.Test) - _mesa_span_default_z(ctx, &span); + _swrast_span_default_z(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); if (ctx->Texture._EnabledUnits) - _mesa_span_default_texcoords(ctx, &span); + _swrast_span_default_texcoords(ctx, &span); for (row=0; rowVisual.rgbMode) - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); else - _mesa_write_index_span(ctx, &span); + _swrast_write_index_span(ctx, &span); /* get ready for next row */ if (mask != 1) @@ -243,9 +243,9 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, } if (ctx->Visual.rgbMode) - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); else - _mesa_write_index_span(ctx, &span); + _swrast_write_index_span(ctx, &span); /* get ready for next row */ if (mask != 128) diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c index 5afc6a030c1..2e98b5f21b7 100644 --- a/src/mesa/swrast/s_blend.c +++ b/src/mesa/swrast/s_blend.c @@ -1,4 +1,4 @@ -/* $Id: s_blend.c,v 1.25 2002/10/17 15:26:39 brianp Exp $ */ +/* $Id: s_blend.c,v 1.26 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -774,7 +774,7 @@ void _swrast_choose_blend_func( GLcontext *ctx ) * pixel coordinates. */ void -_mesa_blend_span( GLcontext *ctx, const struct sw_span *span, +_swrast_blend_span( GLcontext *ctx, const struct sw_span *span, GLchan rgba[][4] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -791,14 +791,14 @@ _mesa_blend_span( GLcontext *ctx, const struct sw_span *span, span->array->x, span->array->y, framebuffer, span->array->mask ); if (swrast->_RasterMask & ALPHABUF_BIT) { - _mesa_read_alpha_pixels( ctx, span->end, + _swrast_read_alpha_pixels( ctx, span->end, span->array->x, span->array->y, framebuffer, span->array->mask ); } } else { /* horizontal run of pixels */ - _mesa_read_rgba_span( ctx, ctx->DrawBuffer, span->end, + _swrast_read_rgba_span( ctx, ctx->DrawBuffer, span->end, span->x, span->y, framebuffer ); } diff --git a/src/mesa/swrast/s_blend.h b/src/mesa/swrast/s_blend.h index 8d3124f28c8..5afa604783e 100644 --- a/src/mesa/swrast/s_blend.h +++ b/src/mesa/swrast/s_blend.h @@ -1,4 +1,4 @@ -/* $Id: s_blend.h,v 1.7 2003/02/23 04:10:54 brianp Exp $ */ +/* $Id: s_blend.h,v 1.8 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -35,7 +35,7 @@ extern void -_mesa_blend_span( GLcontext *ctx, const struct sw_span *span, +_swrast_blend_span( GLcontext *ctx, const struct sw_span *span, GLchan rgba[][4] ); diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c index cdb665fc18e..1ee8030cd9d 100644 --- a/src/mesa/swrast/s_buffers.c +++ b/src/mesa/swrast/s_buffers.c @@ -1,4 +1,4 @@ -/* $Id: s_buffers.c,v 1.16 2002/11/13 16:46:19 brianp Exp $ */ +/* $Id: s_buffers.c,v 1.17 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -66,7 +66,7 @@ clear_color_buffer_with_masking( GLcontext *ctx ) for (j = 0; j < width; j++) { COPY_CHAN4(rgba[j], clearColor); } - _mesa_mask_rgba_array( ctx, width, x, y + i, rgba ); + _swrast_mask_rgba_array( ctx, width, x, y + i, rgba ); (*swrast->Driver.WriteRGBASpan)( ctx, width, x, y + i, (CONST GLchan (*)[4]) rgba, NULL ); } @@ -81,7 +81,7 @@ clear_color_buffer_with_masking( GLcontext *ctx ) for (j=0;jColor.ClearIndex; } - _mesa_mask_index_array( ctx, width, x, y + i, span ); + _swrast_mask_index_array( ctx, width, x, y + i, span ); (*swrast->Driver.WriteCI32Span)( ctx, width, x, y + i, span, mask ); } } @@ -190,16 +190,16 @@ _swrast_Clear( GLcontext *ctx, GLbitfield mask, /* do software clearing here */ if (mask) { if (mask & ctx->Color._DrawDestMask) clear_color_buffers(ctx); - if (mask & GL_DEPTH_BUFFER_BIT) _mesa_clear_depth_buffer(ctx); - if (mask & GL_ACCUM_BUFFER_BIT) _mesa_clear_accum_buffer(ctx); - if (mask & GL_STENCIL_BUFFER_BIT) _mesa_clear_stencil_buffer(ctx); + if (mask & GL_DEPTH_BUFFER_BIT) _swrast_clear_depth_buffer(ctx); + if (mask & GL_ACCUM_BUFFER_BIT) _swarst_clear_accum_buffer(ctx); + if (mask & GL_STENCIL_BUFFER_BIT) _swrast_clear_stencil_buffer(ctx); } /* clear software-based alpha buffer(s) */ if ( (mask & GL_COLOR_BUFFER_BIT) && ctx->DrawBuffer->UseSoftwareAlphaBuffers && ctx->Color.ColorMask[ACOMP]) { - _mesa_clear_alpha_buffers( ctx ); + _swrast_clear_alpha_buffers( ctx ); } RENDER_FINISH(swrast,ctx); @@ -211,16 +211,16 @@ _swrast_alloc_buffers( GLframebuffer *buffer ) { /* Reallocate other buffers if needed. */ if (buffer->UseSoftwareDepthBuffer) { - _mesa_alloc_depth_buffer( buffer ); + _swrast_alloc_depth_buffer( buffer ); } if (buffer->UseSoftwareStencilBuffer) { - _mesa_alloc_stencil_buffer( buffer ); + _swrast_alloc_stencil_buffer( buffer ); } if (buffer->UseSoftwareAccumBuffer) { - _mesa_alloc_accum_buffer( buffer ); + _swrast_alloc_accum_buffer( buffer ); } if (buffer->UseSoftwareAlphaBuffers) { - _mesa_alloc_alpha_buffers( buffer ); + _swrast_alloc_alpha_buffers( buffer ); } } diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 29b73df3657..e36da390302 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -1,4 +1,4 @@ -/* $Id: s_context.c,v 1.47 2003/03/15 17:33:27 brianp Exp $ */ +/* $Id: s_context.c,v 1.48 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -601,12 +601,12 @@ _swrast_flush( GLcontext *ctx ) if (swrast->PointSpan.end > 0) { if (ctx->Visual.rgbMode) { if (ctx->Texture._EnabledUnits) - _mesa_write_texture_span(ctx, &(swrast->PointSpan)); + _swrast_write_texture_span(ctx, &(swrast->PointSpan)); else - _mesa_write_rgba_span(ctx, &(swrast->PointSpan)); + _swrast_write_rgba_span(ctx, &(swrast->PointSpan)); } else { - _mesa_write_index_span(ctx, &(swrast->PointSpan)); + _swrast_write_index_span(ctx, &(swrast->PointSpan)); } swrast->PointSpan.end = 0; } diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index 3a8d05b7f3d..b66cad2dad3 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -1,10 +1,10 @@ -/* $Id: s_copypix.c,v 1.43 2002/12/05 04:46:54 brianp Exp $ */ +/* $Id: s_copypix.c,v 1.44 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library * Version: 5.1 * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -28,13 +28,13 @@ #include "glheader.h" #include "context.h" #include "convolve.h" +#include "histogram.h" #include "macros.h" #include "imports.h" #include "pixel.h" #include "s_context.h" #include "s_depth.h" -#include "s_histogram.h" #include "s_pixeltex.h" #include "s_span.h" #include "s_stencil.h" @@ -108,9 +108,9 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_RGBA); if (ctx->Depth.Test) - _mesa_span_default_z(ctx, &span); + _swrast_span_default_z(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); if (SWRAST_CONTEXT(ctx)->_RasterMask == 0 @@ -153,7 +153,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, for (row = 0; row < height; row++) { GLchan rgba[MAX_WIDTH][4]; GLint i; - _mesa_read_rgba_span(ctx, ctx->ReadBuffer, width, srcx, srcy + row, rgba); + _swrast_read_rgba_span(ctx, ctx->ReadBuffer, width, srcx, srcy + row, rgba); /* convert GLchan to GLfloat */ for (i = 0; i < width; i++) { *dest++ = (GLfloat) rgba[i][RCOMP] * (1.0F / CHAN_MAXF); @@ -258,7 +258,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, span.x = destx; span.y = dy; span.end = width; - _mesa_write_zoomed_rgba_span(ctx, &span, + _swrast_write_zoomed_rgba_span(ctx, &span, (CONST GLchan (*)[4])span.array->rgba, desty, 0); } @@ -266,7 +266,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, span.x = destx; span.y = dy; span.end = width; - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); } } @@ -316,9 +316,9 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY); if (ctx->Depth.Test) - _mesa_span_default_z(ctx, &span); + _swrast_span_default_z(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); if (SWRAST_CONTEXT(ctx)->_RasterMask == 0 && !zoom @@ -347,7 +347,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, /* read the source image */ p = tmpImage; for (j = 0; j < height; j++, ssy += stepy) { - _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, ssy, + _swrast_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, ssy, (GLchan (*)[4]) p ); p += width * 4; } @@ -376,7 +376,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, if (changeBuffer) _swrast_use_read_buffer(ctx); ASSERT(width < MAX_WIDTH); - _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, sy, + _swrast_read_rgba_span( ctx, ctx->ReadBuffer, width, srcx, sy, span.array->rgba ); if (changeBuffer) _swrast_use_draw_buffer(ctx); @@ -476,7 +476,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, span.x = destx; span.y = dy; span.end = width; - _mesa_write_zoomed_rgba_span(ctx, &span, + _swrast_write_zoomed_rgba_span(ctx, &span, (CONST GLchan (*)[4]) span.array->rgba, desty, 0); } @@ -484,7 +484,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, span.x = destx; span.y = dy; span.end = width; - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); } } @@ -527,9 +527,9 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY); if (ctx->Depth.Test) - _mesa_span_default_z(ctx, &span); + _swrast_span_default_z(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); /* If read and draw buffer are different we must do buffer switching */ changeBuffer = ctx->Pixel.ReadBuffer != ctx->Color.DrawBuffer @@ -548,7 +548,7 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy, /* read the image */ p = tmpImage; for (j = 0; j < height; j++, ssy += stepy) { - _mesa_read_index_span( ctx, ctx->ReadBuffer, width, srcx, ssy, p ); + _swrast_read_index_span( ctx, ctx->ReadBuffer, width, srcx, ssy, p ); p += width; } p = tmpImage; @@ -572,7 +572,7 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy, else { if (changeBuffer) _swrast_use_read_buffer(ctx); - _mesa_read_index_span( ctx, ctx->ReadBuffer, width, srcx, sy, + _swrast_read_index_span( ctx, ctx->ReadBuffer, width, srcx, sy, span.array->index ); if (changeBuffer) _swrast_use_draw_buffer(ctx); @@ -591,9 +591,9 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy, span.y = dy; span.end = width; if (zoom) - _mesa_write_zoomed_index_span(ctx, &span, desty, 0); + _swrast_write_zoomed_index_span(ctx, &span, desty, 0); else - _mesa_write_index_span(ctx, &span); + _swrast_write_index_span(ctx, &span); } if (overlapping) @@ -641,9 +641,9 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, overlapping = regions_overlap(srcx, srcy, destx, desty, width, height, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY); - _mesa_span_default_color(ctx, &span); + _swrast_span_default_color(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); if (overlapping) { GLint ssy = sy; @@ -654,7 +654,7 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, } p = tmpImage; for (j = 0; j < height; j++, ssy += stepy) { - _mesa_read_depth_span_float(ctx, width, srcx, ssy, p); + _swrast_read_depth_span_float(ctx, width, srcx, ssy, p); p += width; } p = tmpImage; @@ -673,7 +673,7 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, p += width; } else { - _mesa_read_depth_span_float(ctx, width, srcx, sy, depth); + _swrast_read_depth_span_float(ctx, width, srcx, sy, depth); } /* apply scale and bias */ @@ -688,16 +688,16 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, span.end = width; if (ctx->Visual.rgbMode) { if (zoom) - _mesa_write_zoomed_rgba_span( ctx, &span, + _swrast_write_zoomed_rgba_span( ctx, &span, (const GLchan (*)[4])span.array->rgba, desty, 0 ); else - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); } else { if (zoom) - _mesa_write_zoomed_index_span( ctx, &span, desty, 0 ); + _swrast_write_zoomed_index_span( ctx, &span, desty, 0 ); else - _mesa_write_index_span(ctx, &span); + _swrast_write_index_span(ctx, &span); } } @@ -750,7 +750,7 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, } p = tmpImage; for (j = 0; j < height; j++, ssy += stepy) { - _mesa_read_stencil_span( ctx, width, srcx, ssy, p ); + _swrast_read_stencil_span( ctx, width, srcx, ssy, p ); p += width; } p = tmpImage; @@ -769,7 +769,7 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, p += width; } else { - _mesa_read_stencil_span( ctx, width, srcx, sy, stencil ); + _swrast_read_stencil_span( ctx, width, srcx, sy, stencil ); } /* Apply shift, offset, look-up table */ @@ -782,11 +782,11 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, /* Write stencil values */ if (zoom) { - _mesa_write_zoomed_stencil_span( ctx, width, destx, dy, + _swrast_write_zoomed_stencil_span( ctx, width, destx, dy, stencil, desty, 0 ); } else { - _mesa_write_stencil_span( ctx, width, destx, dy, stencil ); + _swrast_write_stencil_span( ctx, width, destx, dy, stencil ); } } diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index b15638b658a..109585748de 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -1,4 +1,4 @@ -/* $Id: s_depth.c,v 1.25 2002/10/30 19:49:30 brianp Exp $ */ +/* $Id: s_depth.c,v 1.26 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -38,7 +38,7 @@ * Return address of depth buffer value for given window coord. */ GLvoid * -_mesa_zbuffer_address(GLcontext *ctx, GLint x, GLint y) +_swrast_zbuffer_address(GLcontext *ctx, GLint x, GLint y) { if (ctx->Visual.depthBits <= 16) return (GLushort *) ctx->DrawBuffer->DepthBuffer @@ -1355,7 +1355,7 @@ depth_test_pixels( GLcontext *ctx, struct sw_span *span ) * \return approx number of pixels that passed (only zero is reliable) */ GLuint -_mesa_depth_test_span( GLcontext *ctx, struct sw_span *span) +_swrast_depth_test_span( GLcontext *ctx, struct sw_span *span) { if (span->arrayMask & SPAN_XY) return depth_test_pixels(ctx, span); @@ -1375,7 +1375,7 @@ _mesa_depth_test_span( GLcontext *ctx, struct sw_span *span) * This function does clipping before calling the device driver function. */ void -_mesa_read_depth_span( GLcontext *ctx, +_swrast_read_depth_span( GLcontext *ctx, GLint n, GLint x, GLint y, GLdepth depth[] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -1448,7 +1448,7 @@ _mesa_read_depth_span( GLcontext *ctx, * Output: depth - the array of depth values */ void -_mesa_read_depth_span_float( GLcontext *ctx, +_swrast_read_depth_span_float( GLcontext *ctx, GLint n, GLint x, GLint y, GLfloat depth[] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -1529,7 +1529,7 @@ _mesa_read_depth_span_float( GLcontext *ctx, * This function is only called through Driver.alloc_depth_buffer. */ void -_mesa_alloc_depth_buffer( GLframebuffer *buffer ) +_swrast_alloc_depth_buffer( GLframebuffer *buffer ) { GLint bytesPerValue; @@ -1568,7 +1568,7 @@ _mesa_alloc_depth_buffer( GLframebuffer *buffer ) * This function is only called through Driver.clear_depth_buffer. */ void -_mesa_clear_depth_buffer( GLcontext *ctx ) +_swrast_clear_depth_buffer( GLcontext *ctx ) { if (ctx->Visual.depthBits == 0 || !ctx->DrawBuffer->DepthBuffer diff --git a/src/mesa/swrast/s_depth.h b/src/mesa/swrast/s_depth.h index 674ee5e7b5a..9cc8e94524a 100644 --- a/src/mesa/swrast/s_depth.h +++ b/src/mesa/swrast/s_depth.h @@ -1,4 +1,4 @@ -/* $Id: s_depth.h,v 1.7 2003/02/23 04:10:54 brianp Exp $ */ +/* $Id: s_depth.h,v 1.8 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,31 +34,31 @@ extern GLvoid * -_mesa_zbuffer_address(GLcontext *ctx, GLint x, GLint y); +_swrast_zbuffer_address(GLcontext *ctx, GLint x, GLint y); extern GLuint -_mesa_depth_test_span( GLcontext *ctx, struct sw_span *span); +_swrast_depth_test_span( GLcontext *ctx, struct sw_span *span); extern void -_mesa_read_depth_span( GLcontext *ctx, +_swrast_read_depth_span( GLcontext *ctx, GLint n, GLint x, GLint y, GLdepth depth[] ); extern void -_mesa_read_depth_span_float( GLcontext *ctx, GLint n, GLint x, GLint y, +_swrast_read_depth_span_float( GLcontext *ctx, GLint n, GLint x, GLint y, GLfloat depth[] ); extern void -_mesa_alloc_depth_buffer( GLframebuffer *buffer ); +_swrast_alloc_depth_buffer( GLframebuffer *buffer ); extern void -_mesa_clear_depth_buffer( GLcontext *ctx ); +_swrast_clear_depth_buffer( GLcontext *ctx ); #endif diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 10508166982..bc791b90784 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -1,4 +1,4 @@ -/* $Id: s_drawpix.c,v 1.46 2003/03/01 01:50:25 brianp Exp $ */ +/* $Id: s_drawpix.c,v 1.47 2003/03/25 02:23:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -50,7 +50,7 @@ * GL_FALSE if image was completely clipped away (draw nothing) */ GLboolean -_mesa_clip_pixelrect(const GLcontext *ctx, +_swrast_clip_pixelrect(const GLcontext *ctx, GLint *destX, GLint *destY, GLsizei *width, GLsizei *height, GLint *skipPixels, GLint *skipRows) @@ -108,11 +108,11 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, } if (ctx->Depth.Test) - _mesa_span_default_z(ctx, &span); + _swrast_span_default_z(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); if (ctx->Texture._EnabledUnits) - _mesa_span_default_texcoords(ctx, &span); + _swrast_span_default_texcoords(ctx, &span); if ((SWRAST_CONTEXT(ctx)->_RasterMask & ~CLIP_BIT) == 0 && ctx->Texture._EnabledUnits == 0 @@ -136,7 +136,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, rowLength = width; /* If we're not using pixel zoom then do all clipping calculations - * now. Otherwise, we'll let the _mesa_write_zoomed_*_span() functions + * now. Otherwise, we'll let the _swrast_write_zoomed_*_span() functions * handle the clipping. */ if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) { @@ -240,7 +240,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, span.x = destX; span.y = destY; span.end = drawWidth; - _mesa_write_zoomed_rgba_span(ctx, &span, + _swrast_write_zoomed_rgba_span(ctx, &span, (CONST GLchan (*)[4]) src, zoomY0, 0); src += rowLength * 4; destY++; @@ -280,7 +280,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, span.x = destX; span.y = destY; span.end = drawWidth; - _mesa_write_zoomed_rgb_span(ctx, &span, + _swrast_write_zoomed_rgb_span(ctx, &span, (CONST GLchan (*)[3]) src, zoomY0, 0); src += rowLength * 3; destY++; @@ -342,7 +342,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, span.x = destX; span.y = destY; span.end = drawWidth; - _mesa_write_zoomed_rgb_span(ctx, &span, + _swrast_write_zoomed_rgb_span(ctx, &span, (CONST GLchan (*)[3]) span.array->rgb, zoomY0, 0); src += rowLength; destY++; @@ -410,7 +410,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, span.x = destX; span.y = destY; span.end = drawWidth; - _mesa_write_zoomed_rgba_span(ctx, &span, + _swrast_write_zoomed_rgba_span(ctx, &span, (CONST GLchan (*)[4]) span.array->rgba, zoomY0, 0); src += rowLength*2; destY++; @@ -458,7 +458,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, span.x = destX; span.y = destY; span.end = drawWidth; - _mesa_write_zoomed_rgba_span(ctx, &span, + _swrast_write_zoomed_rgba_span(ctx, &span, (CONST GLchan (*)[4]) span.array->rgba, zoomY0, 0); src += rowLength; destY++; @@ -512,9 +512,9 @@ draw_index_pixels( GLcontext *ctx, GLint x, GLint y, INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_INDEX); if (ctx->Depth.Test) - _mesa_span_default_z(ctx, &span); + _swrast_span_default_z(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); /* * General solution @@ -541,9 +541,9 @@ draw_index_pixels( GLcontext *ctx, GLint x, GLint y, span.end = spanEnd; if (zoom) - _mesa_write_zoomed_index_span(ctx, &span, y, skipPixels); + _swrast_write_zoomed_index_span(ctx, &span, y, skipPixels); else - _mesa_write_index_span(ctx, &span); + _swrast_write_index_span(ctx, &span); } skipPixels += spanEnd; } @@ -607,11 +607,11 @@ draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y, } if (zoom) { - _mesa_write_zoomed_stencil_span(ctx, (GLuint) spanWidth, + _swrast_write_zoomed_stencil_span(ctx, (GLuint) spanWidth, spanX, spanY, values, desty, 0); } else { - _mesa_write_stencil_span(ctx, (GLuint) spanWidth, + _swrast_write_stencil_span(ctx, (GLuint) spanWidth, spanX, spanY, values); } } @@ -646,12 +646,12 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, return; } - _mesa_span_default_color(ctx, &span); + _swrast_span_default_color(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); if (ctx->Texture._EnabledUnits) - _mesa_span_default_texcoords(ctx, &span); + _swrast_span_default_texcoords(ctx, &span); if (type == GL_UNSIGNED_SHORT && ctx->Visual.depthBits == 16 && !bias_or_scale && !zoom && ctx->Visual.rgbMode @@ -668,7 +668,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, GLint i; for (i = 0; i < width; i++) span.array->z[i] = zptr[i]; - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); } } else if (type == GL_UNSIGNED_INT && ctx->Visual.depthBits == 32 @@ -684,7 +684,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, _mesa_image_address(&ctx->Unpack, pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0); MEMCPY(span.array->z, zptr, width * sizeof(GLdepth)); - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); } } else { @@ -705,7 +705,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, GL_DEPTH_COMPONENT, type, 0, row, skipPixels); - /* Set these for each row since the _mesa_write_* function may + /* Set these for each row since the _swrast_write_* function may * change them while clipping. */ span.x = spanX; @@ -724,18 +724,18 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, } if (ctx->Visual.rgbMode) { if (zoom) { - _mesa_write_zoomed_rgba_span(ctx, &span, + _swrast_write_zoomed_rgba_span(ctx, &span, (const GLchan (*)[4]) span.array->rgba, desty, skipPixels); } else - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); } else { if (zoom) - _mesa_write_zoomed_index_span(ctx, &span, desty, 0); + _swrast_write_zoomed_index_span(ctx, &span, desty, 0); else - _mesa_write_index_span(ctx, &span); + _swrast_write_index_span(ctx, &span); } } skipPixels += spanEnd; @@ -774,11 +774,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, return; if (ctx->Depth.Test) - _mesa_span_default_z(ctx, &span); + _swrast_span_default_z(ctx, &span); if (ctx->Fog.Enabled) - _mesa_span_default_fog(ctx, &span); + _swrast_span_default_fog(ctx, &span); if (ctx->Texture._EnabledUnits) - _mesa_span_default_texcoords(ctx, &span); + _swrast_span_default_texcoords(ctx, &span); if (SWRAST_CONTEXT(ctx)->_RasterMask == 0 && !zoom && x >= 0 && y >= 0 && x + width <= (GLint) ctx->DrawBuffer->Width @@ -861,7 +861,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, const GLvoid *source = _mesa_image_address(unpack, pixels, width, height, format, type, 0, row, skipPixels); - /* Set these for each row since the _mesa_write_* function may + /* Set these for each row since the _swrast_write_* function may * change them while clipping. */ span.x = spanX; @@ -889,11 +889,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, (CONST GLchan (*)[4]) span.array->rgba, NULL); } else if (zoom) { - _mesa_write_zoomed_rgba_span(ctx, &span, + _swrast_write_zoomed_rgba_span(ctx, &span, (CONST GLchan (*)[4]) span.array->rgba, desty, skipPixels); } else { - _mesa_write_rgba_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); } } diff --git a/src/mesa/swrast/s_drawpix.h b/src/mesa/swrast/s_drawpix.h index a792ef8dd44..9c0d8e5529f 100644 --- a/src/mesa/swrast/s_drawpix.h +++ b/src/mesa/swrast/s_drawpix.h @@ -1,4 +1,4 @@ -/* $Id: s_drawpix.h,v 1.3 2001/03/12 00:48:42 gareth Exp $ */ +/* $Id: s_drawpix.h,v 1.4 2003/03/25 02:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,7 +34,7 @@ extern GLboolean -_mesa_clip_pixelrect(const GLcontext *ctx, +_swrast_clip_pixelrect(const GLcontext *ctx, GLint *destX, GLint *destY, GLsizei *width, GLsizei *height, GLint *skipPixels, GLint *skipRows); diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c index 614820cc4c7..f0264ac7741 100644 --- a/src/mesa/swrast/s_feedback.c +++ b/src/mesa/swrast/s_feedback.c @@ -1,4 +1,4 @@ -/* $Id: s_feedback.c,v 1.10 2003/03/01 01:50:25 brianp Exp $ */ +/* $Id: s_feedback.c,v 1.11 2003/03/25 02:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -85,12 +85,12 @@ static void feedback_vertex( GLcontext *ctx, /* * Put triangle in feedback buffer. */ -void _mesa_feedback_triangle( GLcontext *ctx, +void _swrast_feedback_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2) { - if (_mesa_cull_triangle( ctx, v0, v1, v2 )) { + if (_swrast_culltriangle( ctx, v0, v1, v2 )) { FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN ); FEEDBACK_TOKEN( ctx, (GLfloat) 3 ); /* three vertices */ @@ -107,7 +107,7 @@ void _mesa_feedback_triangle( GLcontext *ctx, } -void _mesa_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) +void _swrast_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) { GLenum token = GL_LINE_TOKEN; SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -129,19 +129,19 @@ void _mesa_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 } -void _mesa_feedback_point( GLcontext *ctx, const SWvertex *v ) +void _swrast_feedback_point( GLcontext *ctx, const SWvertex *v ) { FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POINT_TOKEN ); feedback_vertex( ctx, v, v ); } -void _mesa_select_triangle( GLcontext *ctx, +void _swrast_select_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2) { - if (_mesa_cull_triangle( ctx, v0, v1, v2 )) { + if (_swrast_culltriangle( ctx, v0, v1, v2 )) { const GLfloat zs = 1.0F / ctx->DepthMaxF; _mesa_update_hitflag( ctx, v0->win[2] * zs ); @@ -151,7 +151,7 @@ void _mesa_select_triangle( GLcontext *ctx, } -void _mesa_select_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) +void _swrast_select_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) { const GLfloat zs = 1.0F / ctx->DepthMaxF; _mesa_update_hitflag( ctx, v0->win[2] * zs ); @@ -159,7 +159,7 @@ void _mesa_select_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ) } -void _mesa_select_point( GLcontext *ctx, const SWvertex *v ) +void _swrast_select_point( GLcontext *ctx, const SWvertex *v ) { const GLfloat zs = 1.0F / ctx->DepthMaxF; _mesa_update_hitflag( ctx, v->win[2] * zs ); diff --git a/src/mesa/swrast/s_feedback.h b/src/mesa/swrast/s_feedback.h index 9acae42db63..5b86a94bf89 100644 --- a/src/mesa/swrast/s_feedback.h +++ b/src/mesa/swrast/s_feedback.h @@ -1,4 +1,4 @@ -/* $Id: s_feedback.h,v 1.5 2001/03/12 00:48:42 gareth Exp $ */ +/* $Id: s_feedback.h,v 1.6 2003/03/25 02:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -33,20 +33,20 @@ #include "swrast.h" -extern void _mesa_feedback_point( GLcontext *ctx, const SWvertex *v ); +extern void _swrast_feedback_point( GLcontext *ctx, const SWvertex *v ); -extern void _mesa_feedback_line( GLcontext *ctx, +extern void _swrast_feedback_line( GLcontext *ctx, const SWvertex *v1, const SWvertex *v2 ); -extern void _mesa_feedback_triangle( GLcontext *ctx, const SWvertex *v0, +extern void _swrast_feedback_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ); -extern void _mesa_select_point( GLcontext *ctx, const SWvertex *v ); +extern void _swrast_select_point( GLcontext *ctx, const SWvertex *v ); -extern void _mesa_select_line( GLcontext *ctx, +extern void _swrast_select_line( GLcontext *ctx, const SWvertex *v1, const SWvertex *v2 ); -extern void _mesa_select_triangle( GLcontext *ctx, const SWvertex *v0, +extern void _swrast_select_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ); #endif diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c index 7a97193e1e5..0b3ae5b060e 100644 --- a/src/mesa/swrast/s_fog.c +++ b/src/mesa/swrast/s_fog.c @@ -1,4 +1,4 @@ -/* $Id: s_fog.c,v 1.24 2003/03/01 01:50:25 brianp Exp $ */ +/* $Id: s_fog.c,v 1.25 2003/03/25 02:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -41,7 +41,7 @@ * Used to convert current raster distance to a fog factor in [0,1]. */ GLfloat -_mesa_z_to_fogfactor(GLcontext *ctx, GLfloat z) +_swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z) { GLfloat d, f; @@ -62,7 +62,7 @@ _mesa_z_to_fogfactor(GLcontext *ctx, GLfloat z) f = (GLfloat) exp(-(d * d * z * z)); return f; default: - _mesa_problem(ctx, "Bad fog mode in _mesa_z_to_fogfactor"); + _mesa_problem(ctx, "Bad fog mode in _swrast_z_to_fogfactor"); return 0.0; } } @@ -222,7 +222,7 @@ compute_fog_factors_from_z( const GLcontext *ctx, * fog factors per vertex. */ void -_mesa_fog_rgba_span( const GLcontext *ctx, struct sw_span *span ) +_swrast_fog_rgba_span( const GLcontext *ctx, struct sw_span *span ) { const SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLuint n = span->end; @@ -240,7 +240,7 @@ _mesa_fog_rgba_span( const GLcontext *ctx, struct sw_span *span ) if (swrast->_PreferPixelFog) { /* compute fog factor from each fragment's Z value */ if ((span->interpMask & SPAN_Z) && (span->arrayMask & SPAN_Z) == 0) - _mesa_span_interpolate_z(ctx, span); + _swrast_span_interpolate_z(ctx, span); compute_fog_factors_from_z(ctx, n, span->array->z, span->array->fog); span->arrayMask |= SPAN_FOG; } @@ -275,7 +275,7 @@ _mesa_fog_rgba_span( const GLcontext *ctx, struct sw_span *span ) * As above, but color index mode. */ void -_mesa_fog_ci_span( const GLcontext *ctx, struct sw_span *span ) +_swrast_fog_ci_span( const GLcontext *ctx, struct sw_span *span ) { const SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLuint n = span->end; @@ -288,7 +288,7 @@ _mesa_fog_ci_span( const GLcontext *ctx, struct sw_span *span ) if (swrast->_PreferPixelFog) { /* compute fog factor from each fragment's Z value */ if ((span->interpMask & SPAN_Z) && (span->arrayMask & SPAN_Z) == 0) - _mesa_span_interpolate_z(ctx, span); + _swrast_span_interpolate_z(ctx, span); compute_fog_factors_from_z(ctx, n, span->array->z, span->array->fog); span->arrayMask |= SPAN_FOG; } diff --git a/src/mesa/swrast/s_fog.h b/src/mesa/swrast/s_fog.h index c7b234aee6e..acc522d27fd 100644 --- a/src/mesa/swrast/s_fog.h +++ b/src/mesa/swrast/s_fog.h @@ -1,4 +1,4 @@ -/* $Id: s_fog.h,v 1.9 2002/02/17 17:30:58 brianp Exp $ */ +/* $Id: s_fog.h,v 1.10 2003/03/25 02:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,13 +34,13 @@ extern GLfloat -_mesa_z_to_fogfactor(GLcontext *ctx, GLfloat z); +_swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z); extern void -_mesa_fog_rgba_span( const GLcontext *ctx, struct sw_span *span ); +_swrast_fog_rgba_span( const GLcontext *ctx, struct sw_span *span ); extern void -_mesa_fog_ci_span( const GLcontext *ctx, struct sw_span *span ); +_swrast_fog_ci_span( const GLcontext *ctx, struct sw_span *span ); #endif diff --git a/src/mesa/swrast/s_imaging.c b/src/mesa/swrast/s_imaging.c index 98cbe347a72..1c432cc1b24 100644 --- a/src/mesa/swrast/s_imaging.c +++ b/src/mesa/swrast/s_imaging.c @@ -1,4 +1,4 @@ -/* $Id: s_imaging.c,v 1.6 2002/07/09 01:22:52 brianp Exp $ */ +/* $Id: s_imaging.c,v 1.7 2003/03/25 02:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -46,7 +46,7 @@ _swrast_CopyColorTable( GLcontext *ctx, width = MAX_WIDTH; /* read the data from framebuffer */ - _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data ); + _swrast_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data ); /* Restore reading from draw buffer (the default) */ _swrast_use_draw_buffer(ctx); @@ -67,7 +67,7 @@ _swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start, width = MAX_WIDTH; /* read the data from framebuffer */ - _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data ); + _swrast_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data ); /* Restore reading from draw buffer (the default) */ _swrast_use_draw_buffer(ctx); @@ -90,7 +90,7 @@ _swrast_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target, RENDER_START( swrast, ctx ); /* read the data from framebuffer */ - _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, + _swrast_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, (GLchan (*)[4]) rgba ); RENDER_FINISH( swrast, ctx ); @@ -121,7 +121,7 @@ _swrast_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target, /* read pixels from framebuffer */ for (i = 0; i < height; i++) { - _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y + i, + _swrast_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y + i, (GLchan (*)[4]) rgba[i] ); } diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c index b21b39d61f7..c3c5c582f15 100644 --- a/src/mesa/swrast/s_lines.c +++ b/src/mesa/swrast/s_lines.c @@ -1,4 +1,4 @@ -/* $Id: s_lines.c,v 1.35 2003/03/01 01:50:25 brianp Exp $ */ +/* $Id: s_lines.c,v 1.36 2003/03/25 02:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -89,11 +89,11 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor ) y[i]++; } if ((span->interpMask | span->arrayMask) & SPAN_TEXTURE) - _mesa_write_texture_span(ctx, span); + _swrast_write_texture_span(ctx, span); else if ((span->interpMask | span->arrayMask) & SPAN_RGBA) - _mesa_write_rgba_span(ctx, span); + _swrast_write_rgba_span(ctx, span); else - _mesa_write_index_span(ctx, span); + _swrast_write_index_span(ctx, span); } } else { @@ -110,11 +110,11 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor ) x[i]++; } if ((span->interpMask | span->arrayMask) & SPAN_TEXTURE) - _mesa_write_texture_span(ctx, span); + _swrast_write_texture_span(ctx, span); else if ((span->interpMask | span->arrayMask) & SPAN_RGBA) - _mesa_write_rgba_span(ctx, span); + _swrast_write_rgba_span(ctx, span); else - _mesa_write_index_span(ctx, span); + _swrast_write_index_span(ctx, span); } } } @@ -129,14 +129,14 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor ) /* Simple color index line (no stipple, width=1, no Z, no fog, no tex)*/ #define NAME simple_ci_line #define INTERP_INDEX -#define RENDER_SPAN(span) _mesa_write_index_span(ctx, &span) +#define RENDER_SPAN(span) _swrast_write_index_span(ctx, &span) #include "s_linetemp.h" /* Simple RGBA index line (no stipple, width=1, no Z, no fog, no tex)*/ #define NAME simple_rgba_line #define INTERP_RGBA -#define RENDER_SPAN(span) _mesa_write_rgba_span(ctx, &span); +#define RENDER_SPAN(span) _swrast_write_rgba_span(ctx, &span); #include "s_linetemp.h" @@ -154,7 +154,7 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor ) draw_wide_line(ctx, &span, dx > dy); \ } \ else { \ - _mesa_write_index_span(ctx, &span); \ + _swrast_write_index_span(ctx, &span); \ } #include "s_linetemp.h" @@ -173,7 +173,7 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor ) draw_wide_line(ctx, &span, dx > dy); \ } \ else { \ - _mesa_write_rgba_span(ctx, &span); \ + _swrast_write_rgba_span(ctx, &span); \ } #include "s_linetemp.h" @@ -193,7 +193,7 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor ) draw_wide_line(ctx, &span, dx > dy); \ } \ else { \ - _mesa_write_texture_span(ctx, &span); \ + _swrast_write_texture_span(ctx, &span); \ } #include "s_linetemp.h" @@ -214,7 +214,7 @@ draw_wide_line( GLcontext *ctx, struct sw_span *span, GLboolean xMajor ) draw_wide_line(ctx, &span, dx > dy); \ } \ else { \ - _mesa_write_texture_span(ctx, &span); \ + _swrast_write_texture_span(ctx, &span); \ } #include "s_linetemp.h" @@ -332,11 +332,11 @@ _swrast_choose_line( GLcontext *ctx ) } } else if (ctx->RenderMode == GL_FEEDBACK) { - USE(_mesa_feedback_line); + USE(_swrast_feedback_line); } else { ASSERT(ctx->RenderMode == GL_SELECT); - USE(_mesa_select_line); + USE(_swrast_select_line); } /*_mesa_print_line_function(ctx);*/ diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h index 0bea948d355..34bff2fdb11 100644 --- a/src/mesa/swrast/s_linetemp.h +++ b/src/mesa/swrast/s_linetemp.h @@ -1,4 +1,4 @@ -/* $Id: s_linetemp.h,v 1.17 2003/02/25 19:26:01 brianp Exp $ */ +/* $Id: s_linetemp.h,v 1.18 2003/03/25 02:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -153,7 +153,7 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) return; #ifdef DEPTH_TYPE - zPtr = (DEPTH_TYPE *) _mesa_zbuffer_address(ctx, x0, y0); + zPtr = (DEPTH_TYPE *) _swrast_zbuffer_address(ctx, x0, y0); #endif #ifdef PIXEL_ADDRESS pixelPtr = (PIXEL_TYPE *) PIXEL_ADDRESS(x0,y0); diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c index 277ace6fa60..c130387674b 100644 --- a/src/mesa/swrast/s_logic.c +++ b/src/mesa/swrast/s_logic.c @@ -1,4 +1,4 @@ -/* $Id: s_logic.c,v 1.12 2002/10/24 23:57:24 brianp Exp $ */ +/* $Id: s_logic.c,v 1.13 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -166,7 +166,7 @@ index_logicop( GLcontext *ctx, GLuint n, GLuint index[], const GLuint dest[], * used if the device driver can't do logic ops. */ void -_mesa_logicop_ci_span( GLcontext *ctx, const struct sw_span *span, +_swrast_logicop_ci_span( GLcontext *ctx, const struct sw_span *span, GLuint index[] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -463,7 +463,7 @@ rgba_logicop_chan( const GLcontext *ctx, GLuint n, const GLubyte mask[], * pixel coordinates. */ void -_mesa_logicop_rgba_span( GLcontext *ctx, const struct sw_span *span, +_swrast_logicop_rgba_span( GLcontext *ctx, const struct sw_span *span, GLchan rgba[][4] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -477,13 +477,13 @@ _mesa_logicop_rgba_span( GLcontext *ctx, const struct sw_span *span, span->array->x, span->array->y, dest, span->array->mask); if (SWRAST_CONTEXT(ctx)->_RasterMask & ALPHABUF_BIT) { - _mesa_read_alpha_pixels(ctx, span->end, + _swrast_read_alpha_pixels(ctx, span->end, span->array->x, span->array->y, dest, span->array->mask); } } else { - _mesa_read_rgba_span(ctx, ctx->DrawBuffer, span->end, + _swrast_read_rgba_span(ctx, ctx->DrawBuffer, span->end, span->x, span->y, dest); } diff --git a/src/mesa/swrast/s_logic.h b/src/mesa/swrast/s_logic.h index 537b44a6b96..824f2352f3f 100644 --- a/src/mesa/swrast/s_logic.h +++ b/src/mesa/swrast/s_logic.h @@ -1,4 +1,4 @@ -/* $Id: s_logic.h,v 1.5 2002/02/02 21:40:33 brianp Exp $ */ +/* $Id: s_logic.h,v 1.6 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,12 +34,12 @@ extern void -_mesa_logicop_ci_span( GLcontext *ctx, const struct sw_span *span, +_swrast_logicop_ci_span( GLcontext *ctx, const struct sw_span *span, GLuint index[] ); extern void -_mesa_logicop_rgba_span( GLcontext *ctx, const struct sw_span *span, +_swrast_logicop_rgba_span( GLcontext *ctx, const struct sw_span *span, GLchan rgba[][4] ); diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c index 7e0adc42d35..2b761426df6 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.8 2002/08/07 00:45:07 brianp Exp $ */ +/* $Id: s_masking.c,v 1.9 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -42,7 +42,7 @@ void -_mesa_mask_rgba_span( GLcontext *ctx, const struct sw_span *span, +_swrast_mask_rgba_span( GLcontext *ctx, const struct sw_span *span, GLchan rgba[][4] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -68,12 +68,12 @@ _mesa_mask_rgba_span( GLcontext *ctx, const struct sw_span *span, (*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->array->x, span->array->y, + _swrast_read_alpha_pixels(ctx, n, span->array->x, span->array->y, dest, span->array->mask); } } else { - _mesa_read_rgba_span(ctx, ctx->DrawBuffer, n, span->x, span->y, dest); + _swrast_read_rgba_span(ctx, ctx->DrawBuffer, n, span->x, span->y, dest); } #if CHAN_BITS == 8 @@ -97,7 +97,7 @@ _mesa_mask_rgba_span( GLcontext *ctx, const struct sw_span *span, * Apply glColorMask to a span of RGBA pixels. */ void -_mesa_mask_rgba_array( GLcontext *ctx, +_swrast_mask_rgba_array( GLcontext *ctx, GLuint n, GLint x, GLint y, GLchan rgba[][4] ) { GLchan dest[MAX_WIDTH][4]; @@ -110,7 +110,7 @@ _mesa_mask_rgba_array( GLcontext *ctx, GLuint *rgba32 = (GLuint *) rgba; GLuint *dest32 = (GLuint *) dest; - _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _swrast_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); for (i = 0; i < n; i++) { rgba32[i] = (rgba32[i] & srcMask) | (dest32[i] & dstMask); } @@ -122,7 +122,7 @@ _mesa_mask_rgba_array( GLcontext *ctx, const GLint bMask = ctx->Color.ColorMask[BCOMP]; const GLint aMask = ctx->Color.ColorMask[ACOMP]; - _mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); + _swrast_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest ); for (i = 0; i < n; i++) { if (!rMask) rgba[i][RCOMP] = dest[i][RCOMP]; if (!gMask) rgba[i][GCOMP] = dest[i][GCOMP]; @@ -136,7 +136,7 @@ _mesa_mask_rgba_array( GLcontext *ctx, void -_mesa_mask_index_span( GLcontext *ctx, const struct sw_span *span, +_swrast_mask_index_span( GLcontext *ctx, const struct sw_span *span, GLuint index[] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -159,7 +159,7 @@ _mesa_mask_index_span( GLcontext *ctx, const struct sw_span *span, } } else { - _mesa_read_index_span(ctx, ctx->DrawBuffer, span->end, span->x, span->y, + _swrast_read_index_span(ctx, ctx->DrawBuffer, span->end, span->x, span->y, fbindexes ); for (i = 0; i < span->end; i++) { @@ -174,14 +174,14 @@ _mesa_mask_index_span( GLcontext *ctx, const struct sw_span *span, * Apply glIndexMask to a span of CI pixels. */ void -_mesa_mask_index_array( GLcontext *ctx, +_swrast_mask_index_array( GLcontext *ctx, GLuint n, GLint x, GLint y, GLuint index[] ) { GLuint i; GLuint fbindexes[MAX_WIDTH]; GLuint msrc, mdest; - _mesa_read_index_span( ctx, ctx->DrawBuffer, n, x, y, fbindexes ); + _swrast_read_index_span( ctx, ctx->DrawBuffer, n, x, y, fbindexes ); msrc = ctx->Color.IndexMask; mdest = ~msrc; diff --git a/src/mesa/swrast/s_masking.h b/src/mesa/swrast/s_masking.h index df68d81cfb1..f9f61e950fb 100644 --- a/src/mesa/swrast/s_masking.h +++ b/src/mesa/swrast/s_masking.h @@ -1,4 +1,4 @@ -/* $Id: s_masking.h,v 1.5 2002/02/02 21:40:33 brianp Exp $ */ +/* $Id: s_masking.h,v 1.6 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -37,12 +37,12 @@ * Implement glColorMask for a span of RGBA pixels. */ extern void -_mesa_mask_rgba_span( GLcontext *ctx, const struct sw_span *span, +_swrast_mask_rgba_span( GLcontext *ctx, const struct sw_span *span, GLchan rgba[][4] ); extern void -_mesa_mask_rgba_array( GLcontext *ctx, GLuint n, GLint x, GLint y, +_swrast_mask_rgba_array( GLcontext *ctx, GLuint n, GLint x, GLint y, GLchan rgba[][4] ); @@ -50,12 +50,12 @@ _mesa_mask_rgba_array( GLcontext *ctx, GLuint n, GLint x, GLint y, * Implement glIndexMask for a span of CI pixels. */ extern void -_mesa_mask_index_span( GLcontext *ctx, const struct sw_span *span, +_swrast_mask_index_span( GLcontext *ctx, const struct sw_span *span, GLuint index[] ); extern void -_mesa_mask_index_array( GLcontext *ctx, +_swrast_mask_index_array( GLcontext *ctx, GLuint n, GLint x, GLint y, GLuint index[] ); diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c index 80c628604b8..7d5180381a9 100644 --- a/src/mesa/swrast/s_nvfragprog.c +++ b/src/mesa/swrast/s_nvfragprog.c @@ -1,4 +1,4 @@ -/* $Id: s_nvfragprog.c,v 1.11 2003/03/19 07:15:35 joukj Exp $ */ +/* $Id: s_nvfragprog.c,v 1.12 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -74,7 +74,7 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4], const GLfloat texH = (GLfloat) texImg->HeightScale; GLchan rgba[4]; - GLfloat lambda = _mesa_compute_lambda(texdx[0], texdy[0], /* ds/dx, ds/dy */ + GLfloat lambda = _swrast_compute_lambda(texdx[0], texdy[0], /* ds/dx, ds/dy */ texdx[1], texdy[1], /* dt/dx, dt/dy */ texdx[3], texdy[2], /* dq/dx, dq/dy */ texW, texH, diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 2bbd169b747..640a70ac92b 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -1,4 +1,4 @@ -/* $Id: s_points.c,v 1.20 2003/03/01 01:50:26 brianp Exp $ */ +/* $Id: s_points.c,v 1.21 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -268,10 +268,10 @@ _swrast_choose_point( GLcontext *ctx ) } } else if (ctx->RenderMode==GL_FEEDBACK) { - USE(_mesa_feedback_point); + USE(_swrast_feedback_point); } else { /* GL_SELECT mode */ - USE(_mesa_select_point); + USE(_swrast_select_point); } } diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index d4c86ab00e7..d0e2b54a039 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -1,4 +1,4 @@ -/* $Id: s_pointtemp.h,v 1.22 2003/01/14 04:55:46 brianp Exp $ */ +/* $Id: s_pointtemp.h,v 1.23 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -193,13 +193,13 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) (swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT))) { #if FLAGS & (TEXTURE | SPRITE) if (ctx->Texture._EnabledUnits) - _mesa_write_texture_span(ctx, span); + _swrast_write_texture_span(ctx, span); else - _mesa_write_rgba_span(ctx, span); + _swrast_write_rgba_span(ctx, span); #elif FLAGS & RGBA - _mesa_write_rgba_span(ctx, span); + _swrast_write_rgba_span(ctx, span); #else - _mesa_write_index_span(ctx, span); + _swrast_write_index_span(ctx, span); #endif span->end = 0; } @@ -322,13 +322,13 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) (swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT))) { #if FLAGS & (TEXTURE | SPRITE) if (ctx->Texture._EnabledUnits) - _mesa_write_texture_span(ctx, span); + _swrast_write_texture_span(ctx, span); else - _mesa_write_rgba_span(ctx, span); + _swrast_write_rgba_span(ctx, span); #elif FLAGS & RGBA - _mesa_write_rgba_span(ctx, span); + _swrast_write_rgba_span(ctx, span); #else - _mesa_write_index_span(ctx, span); + _swrast_write_index_span(ctx, span); #endif span->end = 0; } diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 5375cb922d9..11bb6265b6f 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -1,4 +1,4 @@ -/* $Id: s_readpix.c,v 1.17 2002/10/24 23:57:24 brianp Exp $ */ +/* $Id: s_readpix.c,v 1.18 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -126,7 +126,7 @@ read_depth_pixels( GLcontext *ctx, GLushort *dst = (GLushort*) _mesa_image_address( packing, pixels, width, height, GL_DEPTH_COMPONENT, type, 0, j, 0 ); GLint i; - _mesa_read_depth_span(ctx, width, x, y, depth); + _swrast_read_depth_span(ctx, width, x, y, depth); for (i = 0; i < width; i++) dst[i] = depth[i]; } @@ -138,7 +138,7 @@ read_depth_pixels( GLcontext *ctx, for (j=0;jDriver.ReadRGBASpan)(ctx, readWidth, srcX, srcY, (GLchan (*)[4]) dest); if (ctx->DrawBuffer->UseSoftwareAlphaBuffers) { - _mesa_read_alpha_span(ctx, readWidth, srcX, srcY, + _swrast_read_alpha_span(ctx, readWidth, srcX, srcY, (GLchan (*)[4]) dest); } dest += rowLength * 4; @@ -390,7 +390,7 @@ read_rgba_pixels( GLcontext *ctx, for (row = 0; row < height; row++, y++) { GLchan rgba[MAX_WIDTH][4]; if (ctx->Visual.rgbMode) { - _mesa_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); + _swrast_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); } else { GLuint index[MAX_WIDTH]; @@ -436,7 +436,7 @@ read_rgba_pixels( GLcontext *ctx, GLchan rgba[MAX_WIDTH][4]; GLvoid *dst; if (ctx->Visual.rgbMode) { - _mesa_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); + _swrast_read_rgba_span(ctx, ctx->ReadBuffer, readWidth, x, y, rgba); } else { GLuint index[MAX_WIDTH]; diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 842f3be3c20..d6959e1f4c9 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1,4 +1,4 @@ -/* $Id: s_span.c,v 1.59 2003/03/16 22:02:37 brianp Exp $ */ +/* $Id: s_span.c,v 1.60 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -57,7 +57,7 @@ * Used during setup for glDraw/CopyPixels. */ void -_mesa_span_default_z( GLcontext *ctx, struct sw_span *span ) +_swrast_span_default_z( GLcontext *ctx, struct sw_span *span ) { if (ctx->Visual.depthBits <= 16) span->z = FloatToFixed(ctx->Current.RasterPos[2] * ctx->DepthMax + 0.5F); @@ -73,9 +73,9 @@ _mesa_span_default_z( GLcontext *ctx, struct sw_span *span ) * Used during setup for glDraw/CopyPixels. */ void -_mesa_span_default_fog( GLcontext *ctx, struct sw_span *span ) +_swrast_span_default_fog( GLcontext *ctx, struct sw_span *span ) { - span->fog = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterDistance); + span->fog = _swrast_z_to_fogfactor(ctx, ctx->Current.RasterDistance); span->fogStep = span->dfogdx = span->dfogdy = 0.0F; span->interpMask |= SPAN_FOG; } @@ -86,7 +86,7 @@ _mesa_span_default_fog( GLcontext *ctx, struct sw_span *span ) * Used during setup for glDraw/CopyPixels. */ void -_mesa_span_default_color( GLcontext *ctx, struct sw_span *span ) +_swrast_span_default_color( GLcontext *ctx, struct sw_span *span ) { if (ctx->Visual.rgbMode) { GLchan r, g, b, a; @@ -124,7 +124,7 @@ _mesa_span_default_color( GLcontext *ctx, struct sw_span *span ) * Used during setup for glDraw/CopyPixels. */ void -_mesa_span_default_texcoords( GLcontext *ctx, struct sw_span *span ) +_swrast_span_default_texcoords( GLcontext *ctx, struct sw_span *span ) { GLuint i; for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { @@ -267,7 +267,7 @@ interpolate_specular(GLcontext *ctx, struct sw_span *span) /* Fill in the span.zArray array from the interpolation values */ void -_mesa_span_interpolate_z( const GLcontext *ctx, struct sw_span *span ) +_swrast_span_interpolate_z( const GLcontext *ctx, struct sw_span *span ) { const GLuint n = span->end; GLuint i; @@ -322,7 +322,7 @@ compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, * This is a faster approximation */ GLfloat -_mesa_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, +_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, GLfloat s, GLfloat t, GLfloat q, GLfloat invQ) { @@ -386,7 +386,7 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span) texcoord[i][1] = t * invQ; texcoord[i][2] = r * invQ; texcoord[i][3] = q; - lambda[i] = _mesa_compute_lambda(dsdx, dsdy, dtdx, dtdy, + lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, dqdx, dqdy, texW, texH, s, t, q, invQ); s += dsdx; @@ -465,7 +465,7 @@ interpolate_texcoords(GLcontext *ctx, struct sw_span *span) GLuint i; for (i = 0; i < span->end; i++) { const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - lambda[i] = _mesa_compute_lambda(dsdx, dsdy, dtdx, dtdy, + lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, dqdx, dqdy, texW, texH, s, t, q, invQ); texcoord[i][0] = s * invQ; @@ -641,11 +641,11 @@ multi_write_index_span( GLcontext *ctx, struct sw_span *span ) MEMCPY( indexTmp, span->array->index, span->end * sizeof(GLuint) ); if (ctx->Color.IndexLogicOpEnabled) { - _mesa_logicop_ci_span(ctx, span, indexTmp); + _swrast_logicop_ci_span(ctx, span, indexTmp); } if (ctx->Color.IndexMask != 0xffffffff) { - _mesa_mask_index_span(ctx, span, indexTmp); + _swrast_mask_index_span(ctx, span, indexTmp); } if (span->arrayMask & SPAN_XY) { @@ -698,14 +698,14 @@ multi_write_rgba_span( GLcontext *ctx, struct sw_span *span ) MEMCPY( rgbaTmp, span->array->rgba, 4 * span->end * sizeof(GLchan) ); if (ctx->Color.ColorLogicOpEnabled) { - _mesa_logicop_rgba_span(ctx, span, rgbaTmp); + _swrast_logicop_rgba_span(ctx, span, rgbaTmp); } else if (ctx->Color.BlendEnabled) { - _mesa_blend_span(ctx, span, rgbaTmp); + _swrast_blend_span(ctx, span, rgbaTmp); } if (colorMask != 0xffffffff) { - _mesa_mask_rgba_span(ctx, span, rgbaTmp); + _swrast_mask_rgba_span(ctx, span, rgbaTmp); } if (span->arrayMask & SPAN_XY) { @@ -715,7 +715,7 @@ multi_write_rgba_span( GLcontext *ctx, struct sw_span *span ) (const GLchan (*)[4]) rgbaTmp, span->array->mask); if (SWRAST_CONTEXT(ctx)->_RasterMask & ALPHABUF_BIT) { - _mesa_write_alpha_pixels(ctx, span->end, + _swrast_write_alpha_pixels(ctx, span->end, span->array->x, span->array->y, (const GLchan (*)[4]) rgbaTmp, span->array->mask); @@ -727,7 +727,7 @@ multi_write_rgba_span( GLcontext *ctx, struct sw_span *span ) (const GLchan (*)[4]) rgbaTmp, span->array->mask); if (swrast->_RasterMask & ALPHABUF_BIT) { - _mesa_write_alpha_span(ctx, span->end, span->x, span->y, + _swrast_write_alpha_span(ctx, span->end, span->x, span->y, (const GLchan (*)[4]) rgbaTmp, span->array->mask); } @@ -747,7 +747,7 @@ multi_write_rgba_span( GLcontext *ctx, struct sw_span *span ) * to their original values before returning. */ void -_mesa_write_index_span( GLcontext *ctx, struct sw_span *span) +_swrast_write_index_span( GLcontext *ctx, struct sw_span *span) { SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLuint origInterpMask = span->interpMask; @@ -797,17 +797,17 @@ _mesa_write_index_span( GLcontext *ctx, struct sw_span *span) /* Depth test and stencil */ if (ctx->Depth.Test || ctx->Stencil.Enabled) { if (span->interpMask & SPAN_Z) - _mesa_span_interpolate_z(ctx, span); + _swrast_span_interpolate_z(ctx, span); if (ctx->Stencil.Enabled) { - if (!_mesa_stencil_and_ztest_span(ctx, span)) { + if (!_swrast_stencil_and_ztest_span(ctx, span)) { span->arrayMask = origArrayMask; return; } } else { ASSERT(ctx->Depth.Test); - if (!_mesa_depth_test_span(ctx, span)) { + if (!_swrast_depth_test_span(ctx, span)) { span->arrayMask = origArrayMask; return; } @@ -833,7 +833,7 @@ _mesa_write_index_span( GLcontext *ctx, struct sw_span *span) /* Fog */ if (ctx->Fog.Enabled) { - _mesa_fog_ci_span(ctx, span); + _swrast_fog_ci_span(ctx, span); } /* Antialias coverage application */ @@ -854,11 +854,11 @@ _mesa_write_index_span( GLcontext *ctx, struct sw_span *span) else { /* normal situation: draw to exactly one buffer */ if (ctx->Color.IndexLogicOpEnabled) { - _mesa_logicop_ci_span(ctx, span, span->array->index); + _swrast_logicop_ci_span(ctx, span, span->array->index); } if (ctx->Color.IndexMask != 0xffffffff) { - _mesa_mask_index_span(ctx, span, span->array->index); + _swrast_mask_index_span(ctx, span, span->array->index); } /* write pixels */ @@ -904,7 +904,7 @@ _mesa_write_index_span( GLcontext *ctx, struct sw_span *span) * to their original values before returning. */ void -_mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span) +_swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span) { SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLuint colorMask = *((GLuint *) ctx->Color.ColorMask); @@ -978,7 +978,7 @@ _mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span) /* Do the alpha test */ if (ctx->Color.AlphaEnabled) { - if (!_mesa_alpha_test(ctx, span)) { + if (!_swrast_alpha_test(ctx, span)) { span->interpMask = origInterpMask; span->arrayMask = origArrayMask; return; @@ -988,10 +988,10 @@ _mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span) /* Stencil and Z testing */ if (ctx->Stencil.Enabled || ctx->Depth.Test) { if (span->interpMask & SPAN_Z) - _mesa_span_interpolate_z(ctx, span); + _swrast_span_interpolate_z(ctx, span); if (ctx->Stencil.Enabled) { - if (!_mesa_stencil_and_ztest_span(ctx, span)) { + if (!_swrast_stencil_and_ztest_span(ctx, span)) { span->interpMask = origInterpMask; span->arrayMask = origArrayMask; return; @@ -1001,7 +1001,7 @@ _mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span) ASSERT(ctx->Depth.Test); ASSERT(span->arrayMask & SPAN_Z); /* regular depth testing */ - if (!_mesa_depth_test_span(ctx, span)) { + if (!_swrast_depth_test_span(ctx, span)) { span->interpMask = origInterpMask; span->arrayMask = origArrayMask; return; @@ -1028,7 +1028,7 @@ _mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span) /* Fog */ if (ctx->Fog.Enabled) { - _mesa_fog_rgba_span(ctx, span); + _swrast_fog_rgba_span(ctx, span); monoColor = GL_FALSE; } @@ -1049,17 +1049,17 @@ _mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span) else { /* normal: write to exactly one buffer */ if (ctx->Color.ColorLogicOpEnabled) { - _mesa_logicop_rgba_span(ctx, span, span->array->rgba); + _swrast_logicop_rgba_span(ctx, span, span->array->rgba); monoColor = GL_FALSE; } else if (ctx->Color.BlendEnabled) { - _mesa_blend_span(ctx, span, span->array->rgba); + _swrast_blend_span(ctx, span, span->array->rgba); monoColor = GL_FALSE; } /* Color component masking */ if (colorMask != 0xffffffff) { - _mesa_mask_rgba_span(ctx, span, span->array->rgba); + _swrast_mask_rgba_span(ctx, span, span->array->rgba); monoColor = GL_FALSE; } @@ -1070,7 +1070,7 @@ _mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span) (*swrast->Driver.WriteRGBAPixels)(ctx, span->end, span->array->x, span->array->y, (const GLchan (*)[4]) span->array->rgba, span->array->mask); if (SWRAST_CONTEXT(ctx)->_RasterMask & ALPHABUF_BIT) { - _mesa_write_alpha_pixels(ctx, span->end, + _swrast_write_alpha_pixels(ctx, span->end, span->array->x, span->array->y, (const GLchan (*)[4]) span->array->rgba, span->array->mask); @@ -1088,7 +1088,7 @@ _mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span) (*swrast->Driver.WriteMonoRGBASpan)(ctx, span->end, span->x, span->y, color, span->array->mask); if (swrast->_RasterMask & ALPHABUF_BIT) { - _mesa_write_mono_alpha_span(ctx, span->end, span->x, span->y, + _swrast_write_mono_alpha_span(ctx, span->end, span->x, span->y, color[ACOMP], span->writeAll ? ((const GLubyte *) NULL) : span->array->mask); } @@ -1099,7 +1099,7 @@ _mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span) (const GLchan (*)[4]) span->array->rgba, span->writeAll ? ((const GLubyte *) NULL) : span->array->mask); if (swrast->_RasterMask & ALPHABUF_BIT) { - _mesa_write_alpha_span(ctx, span->end, span->x, span->y, + _swrast_write_alpha_span(ctx, span->end, span->x, span->y, (const GLchan (*)[4]) span->array->rgba, span->writeAll ? ((const GLubyte *) NULL) : span->array->mask); } @@ -1144,7 +1144,7 @@ add_colors(GLuint n, GLchan rgba[][4], GLchan specular[][4] ) * to their original values before returning. */ void -_mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) +_swrast_write_texture_span( GLcontext *ctx, struct sw_span *span) { const GLuint colorMask = *((GLuint *) ctx->Color.ColorMask); SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -1216,7 +1216,7 @@ _mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) _swrast_texture_span( ctx, span ); /* Do the alpha test */ - if (!_mesa_alpha_test(ctx, span)) { + if (!_swrast_alpha_test(ctx, span)) { span->arrayMask = origArrayMask; return; } @@ -1225,10 +1225,10 @@ _mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) /* Stencil and Z testing */ if (ctx->Stencil.Enabled || ctx->Depth.Test) { if (span->interpMask & SPAN_Z) - _mesa_span_interpolate_z(ctx, span); + _swrast_span_interpolate_z(ctx, span); if (ctx->Stencil.Enabled) { - if (!_mesa_stencil_and_ztest_span(ctx, span)) { + if (!_swrast_stencil_and_ztest_span(ctx, span)) { span->arrayMask = origArrayMask; return; } @@ -1237,7 +1237,7 @@ _mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) ASSERT(ctx->Depth.Test); ASSERT(span->arrayMask & SPAN_Z); /* regular depth testing */ - if (!_mesa_depth_test_span(ctx, span)) { + if (!_swrast_depth_test_span(ctx, span)) { span->arrayMask = origArrayMask; return; } @@ -1283,7 +1283,7 @@ _mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) /* Fog */ if (ctx->Fog.Enabled) { - _mesa_fog_rgba_span(ctx, span); + _swrast_fog_rgba_span(ctx, span); } /* Antialias coverage application */ @@ -1302,14 +1302,14 @@ _mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) else { /* normal: write to exactly one buffer */ if (ctx->Color.ColorLogicOpEnabled) { - _mesa_logicop_rgba_span(ctx, span, span->array->rgba); + _swrast_logicop_rgba_span(ctx, span, span->array->rgba); } else if (ctx->Color.BlendEnabled) { - _mesa_blend_span(ctx, span, span->array->rgba); + _swrast_blend_span(ctx, span, span->array->rgba); } if (colorMask != 0xffffffff) { - _mesa_mask_rgba_span(ctx, span, span->array->rgba); + _swrast_mask_rgba_span(ctx, span, span->array->rgba); } @@ -1318,7 +1318,7 @@ _mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) (*swrast->Driver.WriteRGBAPixels)(ctx, span->end, span->array->x, span->array->y, (const GLchan (*)[4]) span->array->rgba, span->array->mask); if (SWRAST_CONTEXT(ctx)->_RasterMask & ALPHABUF_BIT) { - _mesa_write_alpha_pixels(ctx, span->end, + _swrast_write_alpha_pixels(ctx, span->end, span->array->x, span->array->y, (const GLchan (*)[4]) span->array->rgba, span->array->mask); @@ -1330,7 +1330,7 @@ _mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) (const GLchan (*)[4]) span->array->rgba, span->writeAll ? NULL : span->array->mask); if (swrast->_RasterMask & ALPHABUF_BIT) { - _mesa_write_alpha_span(ctx, span->end, span->x, span->y, + _swrast_write_alpha_span(ctx, span->end, span->x, span->y, (const GLchan (*)[4]) span->array->rgba, span->writeAll ? NULL : span->array->mask); } @@ -1347,7 +1347,7 @@ _mesa_write_texture_span( GLcontext *ctx, struct sw_span *span) * reading ouside the buffer's boundaries. */ void -_mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, +_swrast_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLchan rgba[][4] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -1390,7 +1390,7 @@ _mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, (*swrast->Driver.ReadRGBASpan)( ctx, length, x + skip, y, rgba + skip ); if (buffer->UseSoftwareAlphaBuffers) { - _mesa_read_alpha_span(ctx, length, x + skip, y, rgba + skip); + _swrast_read_alpha_span(ctx, length, x + skip, y, rgba + skip); } } } @@ -1401,7 +1401,7 @@ _mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, * reading ouside the buffer's boundaries. */ void -_mesa_read_index_span( GLcontext *ctx, GLframebuffer *buffer, +_swrast_read_index_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLuint indx[] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h index d43aa1ae394..b4ec957db31 100644 --- a/src/mesa/swrast/s_span.h +++ b/src/mesa/swrast/s_span.h @@ -1,4 +1,4 @@ -/* $Id: s_span.h,v 1.18 2003/03/15 17:33:28 brianp Exp $ */ +/* $Id: s_span.h,v 1.19 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -34,43 +34,43 @@ extern void -_mesa_span_default_z( GLcontext *ctx, struct sw_span *span ); +_swrast_span_default_z( GLcontext *ctx, struct sw_span *span ); extern void -_mesa_span_interpolate_z( const GLcontext *ctx, struct sw_span *span ); +_swrast_span_interpolate_z( const GLcontext *ctx, struct sw_span *span ); extern void -_mesa_span_default_fog( GLcontext *ctx, struct sw_span *span ); +_swrast_span_default_fog( GLcontext *ctx, struct sw_span *span ); extern void -_mesa_span_default_color( GLcontext *ctx, struct sw_span *span ); +_swrast_span_default_color( GLcontext *ctx, struct sw_span *span ); extern void -_mesa_span_default_texcoords( GLcontext *ctx, struct sw_span *span ); +_swrast_span_default_texcoords( GLcontext *ctx, struct sw_span *span ); extern GLfloat -_mesa_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, +_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, GLfloat s, GLfloat t, GLfloat q, GLfloat invQ); extern void -_mesa_write_index_span( GLcontext *ctx, struct sw_span *span); +_swrast_write_index_span( GLcontext *ctx, struct sw_span *span); extern void -_mesa_write_rgba_span( GLcontext *ctx, struct sw_span *span); +_swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span); extern void -_mesa_write_texture_span( GLcontext *ctx, struct sw_span *span); +_swrast_write_texture_span( GLcontext *ctx, struct sw_span *span); extern void -_mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, +_swrast_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLchan rgba[][4] ); extern void -_mesa_read_index_span( GLcontext *ctx, GLframebuffer *buffer, +_swrast_read_index_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLuint indx[] ); #endif diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index 94ebe873975..e6282c5af76 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -1,4 +1,4 @@ -/* $Id: s_stencil.c,v 1.28 2002/10/24 23:57:24 brianp Exp $ */ +/* $Id: s_stencil.c,v 1.29 2003/03/25 02:23:47 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -477,7 +477,7 @@ stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span, GLuint face) MEMCPY(oldmask, mask, n * sizeof(GLubyte)); /* apply the depth test */ - _mesa_depth_test_span(ctx, span); + _swrast_depth_test_span(ctx, span); /* Set the stencil pass/fail flags according to result of depth testing. * if oldmask[i] == 0 then @@ -927,7 +927,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, struct sw_span *span, GLuint face ) n, stencil, mask); } else { - _mesa_depth_test_span(ctx, span); + _swrast_depth_test_span(ctx, span); if (ctx->Stencil.ZFailFunc[face] != GL_KEEP) { GLubyte failmask[MAX_WIDTH]; @@ -976,7 +976,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, struct sw_span *span, GLuint face ) MEMCPY(oldmask, mask, n * sizeof(GLubyte)); - _mesa_depth_test_span(ctx, span); + _swrast_depth_test_span(ctx, span); for (i=0;ifacing can only be non-zero if using two-sided stencil */ ASSERT(ctx->Stencil.TestTwoSide || span->facing == 0); @@ -1025,7 +1025,7 @@ _mesa_stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span) * Output: stencil - the array of stencil values */ void -_mesa_read_stencil_span( GLcontext *ctx, +_swrast_read_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y, GLstencil stencil[] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -1078,7 +1078,7 @@ _mesa_read_stencil_span( GLcontext *ctx, * stencil - the array of stencil values */ void -_mesa_write_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y, +_swrast_write_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y, const GLstencil stencil[] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -1127,7 +1127,7 @@ _mesa_write_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y, * deallocated first. The new stencil buffer will be uninitialized. */ void -_mesa_alloc_stencil_buffer( GLframebuffer *buffer ) +_swrast_alloc_stencil_buffer( GLframebuffer *buffer ) { /* deallocate current stencil buffer if present */ if (buffer->Stencil) { @@ -1140,7 +1140,7 @@ _mesa_alloc_stencil_buffer( GLframebuffer *buffer ) MESA_PBUFFER_ALLOC(buffer->Width * buffer->Height * sizeof(GLstencil)); if (!buffer->Stencil) { /* out of memory */ - _mesa_error( NULL, GL_OUT_OF_MEMORY, "_mesa_alloc_stencil_buffer" ); + _mesa_error( NULL, GL_OUT_OF_MEMORY, "_swrast_alloc_stencil_buffer" ); } } @@ -1314,7 +1314,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx ) * Clear the stencil buffer (hardware or software). */ void -_mesa_clear_stencil_buffer( GLcontext *ctx ) +_swrast_clear_stencil_buffer( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); if (swrast->Driver.WriteStencilSpan) { diff --git a/src/mesa/swrast/s_stencil.h b/src/mesa/swrast/s_stencil.h index b174f2e01e1..af95909a12e 100644 --- a/src/mesa/swrast/s_stencil.h +++ b/src/mesa/swrast/s_stencil.h @@ -1,4 +1,4 @@ -/* $Id: s_stencil.h,v 1.9 2002/10/02 23:24:04 brianp Exp $ */ +/* $Id: s_stencil.h,v 1.10 2003/03/25 02:23:48 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -35,26 +35,26 @@ extern GLboolean -_mesa_stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span); +_swrast_stencil_and_ztest_span(GLcontext *ctx, struct sw_span *span); extern void -_mesa_read_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y, +_swrast_read_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y, GLstencil stencil[] ); extern void -_mesa_write_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y, +_swrast_write_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y, const GLstencil stencil[] ); extern void -_mesa_alloc_stencil_buffer( GLframebuffer *buffer ); +_swrast_alloc_stencil_buffer( GLframebuffer *buffer ); extern void -_mesa_clear_stencil_buffer( GLcontext *ctx ); +_swrast_clear_stencil_buffer( GLcontext *ctx ); #endif diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c index e87945ab42d..7101328974b 100644 --- a/src/mesa/swrast/s_texstore.c +++ b/src/mesa/swrast/s_texstore.c @@ -1,4 +1,4 @@ -/* $Id: s_texstore.c,v 1.10 2003/03/01 01:50:26 brianp Exp $ */ +/* $Id: s_texstore.c,v 1.11 2003/03/25 02:23:48 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -81,7 +81,7 @@ read_color_image( GLcontext *ctx, GLint x, GLint y, dst = image; stride = width * 4; for (i = 0; i < height; i++) { - _mesa_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y + i, + _swrast_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y + i, (GLchan (*)[4]) dst ); dst += stride; } @@ -114,7 +114,7 @@ read_depth_image( GLcontext *ctx, GLint x, GLint y, dst = image; for (i = 0; i < height; i++) { - _mesa_read_depth_span_float(ctx, width, x, y + i, dst); + _swrast_read_depth_span_float(ctx, width, x, y + i, dst); dst += width; } diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index fce782466f0..aee92aecbb1 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -1,4 +1,4 @@ -/* $Id: s_triangle.c,v 1.69 2003/03/16 22:02:38 brianp Exp $ */ +/* $Id: s_triangle.c,v 1.70 2003/03/25 02:23:48 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -51,7 +51,7 @@ /* * Just used for feedback mode. */ -GLboolean _mesa_cull_triangle( GLcontext *ctx, +GLboolean _swrast_culltriangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, const SWvertex *v2 ) @@ -80,7 +80,7 @@ GLboolean _mesa_cull_triangle( GLcontext *ctx, span.interpMask |= SPAN_INDEX; \ span.index = IntToFixed(v2->index); \ span.indexStep = 0; -#define RENDER_SPAN( span ) _mesa_write_index_span(ctx, &span); +#define RENDER_SPAN( span ) _swrast_write_index_span(ctx, &span); #include "s_tritemp.h" @@ -92,7 +92,7 @@ GLboolean _mesa_cull_triangle( GLcontext *ctx, #define INTERP_Z 1 #define INTERP_FOG 1 #define INTERP_INDEX 1 -#define RENDER_SPAN( span ) _mesa_write_index_span(ctx, &span); +#define RENDER_SPAN( span ) _swrast_write_index_span(ctx, &span); #include "s_tritemp.h" @@ -116,7 +116,7 @@ GLboolean _mesa_cull_triangle( GLcontext *ctx, span.greenStep = 0; \ span.blueStep = 0; \ span.alphaStep = 0; -#define RENDER_SPAN( span ) _mesa_write_rgba_span(ctx, &span); +#define RENDER_SPAN( span ) _swrast_write_rgba_span(ctx, &span); #include "s_tritemp.h" @@ -136,7 +136,7 @@ GLboolean _mesa_cull_triangle( GLcontext *ctx, ASSERT(ctx->Texture._EnabledUnits == 0); \ ASSERT(ctx->Light.ShadeModel==GL_SMOOTH); \ } -#define RENDER_SPAN( span ) _mesa_write_rgba_span(ctx, &span); +#define RENDER_SPAN( span ) _swrast_write_rgba_span(ctx, &span); #include "s_tritemp.h" @@ -514,7 +514,7 @@ affine_span(GLcontext *ctx, struct sw_span *span, } span->interpMask &= ~SPAN_RGBA; ASSERT(span->arrayMask & SPAN_RGBA); - _mesa_write_rgba_span(ctx, span); + _swrast_write_rgba_span(ctx, span); #undef SPAN_NEAREST #undef SPAN_LINEAR @@ -784,7 +784,7 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span, } ASSERT(span->arrayMask & SPAN_RGBA); - _mesa_write_rgba_span(ctx, span); + _swrast_write_rgba_span(ctx, span); #undef SPAN_NEAREST #undef SPAN_LINEAR @@ -877,7 +877,7 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span, #define INTERP_SPEC 1 #define INTERP_ALPHA 1 #define INTERP_TEX 1 -#define RENDER_SPAN( span ) _mesa_write_texture_span(ctx, &span); +#define RENDER_SPAN( span ) _swrast_write_texture_span(ctx, &span); #include "s_tritemp.h" @@ -896,7 +896,7 @@ fast_persp_span(GLcontext *ctx, struct sw_span *span, #define INTERP_ALPHA 1 #define INTERP_SPEC 1 #define INTERP_MULTITEX 1 -#define RENDER_SPAN( span ) _mesa_write_texture_span(ctx, &span); +#define RENDER_SPAN( span ) _swrast_write_texture_span(ctx, &span); #include "s_tritemp.h" @@ -1031,7 +1031,7 @@ _swrast_choose_triangle( GLcontext *ctx ) if (ctx->RenderMode==GL_RENDER) { if (ctx->Polygon.SmoothFlag) { - _mesa_set_aa_triangle_function(ctx); + _swrast_set_aa_triangle_function(ctx); ASSERT(swrast->Triangle); return; } @@ -1143,10 +1143,10 @@ _swrast_choose_triangle( GLcontext *ctx ) } } else if (ctx->RenderMode==GL_FEEDBACK) { - USE(_mesa_feedback_triangle); + USE(_swrast_feedback_triangle); } else { /* GL_SELECT mode */ - USE(_mesa_select_triangle); + USE(_swrast_select_triangle); } } diff --git a/src/mesa/swrast/s_triangle.h b/src/mesa/swrast/s_triangle.h index 576038db720..09b47852e66 100644 --- a/src/mesa/swrast/s_triangle.h +++ b/src/mesa/swrast/s_triangle.h @@ -1,10 +1,10 @@ -/* $Id: s_triangle.h,v 1.7 2001/03/12 00:48:42 gareth Exp $ */ +/* $Id: s_triangle.h,v 1.8 2003/03/25 02:23:48 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 5.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,9 +25,6 @@ */ - - - #ifndef S_TRIANGLES_H #define S_TRIANGLES_H @@ -36,16 +33,16 @@ #include "swrast.h" -GLboolean _mesa_cull_triangle( GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2); - +extern GLboolean +_swrast_culltriangle( GLcontext *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2); -void +extern void _swrast_choose_triangle( GLcontext *ctx ); -void +extern void _swrast_add_spec_terms_triangle( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1, diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h index b5273500ce3..18749668961 100644 --- a/src/mesa/swrast/s_tritemp.h +++ b/src/mesa/swrast/s_tritemp.h @@ -1,4 +1,4 @@ -/* $Id: s_tritemp.h,v 1.47 2003/03/16 22:02:40 brianp Exp $ */ +/* $Id: s_tritemp.h,v 1.48 2003/03/25 02:23:48 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -701,7 +701,7 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, } # ifdef DEPTH_TYPE zRow = (DEPTH_TYPE *) - _mesa_zbuffer_address(ctx, FixedToInt(fxLeftEdge), span.y); + _swrast_zbuffer_address(ctx, FixedToInt(fxLeftEdge), span.y); dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(DEPTH_TYPE); # endif } diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c index f4fde9b31e5..6cc9be587c4 100644 --- a/src/mesa/swrast/s_zoom.c +++ b/src/mesa/swrast/s_zoom.c @@ -1,4 +1,4 @@ -/* $Id: s_zoom.c,v 1.23 2003/03/01 01:50:26 brianp Exp $ */ +/* $Id: s_zoom.c,v 1.24 2003/03/25 02:23:48 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -36,7 +36,7 @@ /* - * Helper function called from _mesa_write_zoomed_rgba/rgb/index_span(). + * Helper function called from _swrast_write_zoomed_rgba/rgb/index_span(). */ static void zoom_span( GLcontext *ctx, const struct sw_span *span, @@ -219,7 +219,7 @@ zoom_span( GLcontext *ctx, const struct sw_span *span, /* write the span in rows [r0, r1) */ if (format == GL_RGBA || format == GL_RGB) { /* Writing the span may modify the colors, so make a backup now if we're - * going to call _mesa_write_zoomed_span() more than once. + * going to call _swrast_write_zoomed_span() more than once. * Also, clipping may change the span end value, so store it as well. */ const GLint end = zoomed.end; /* save */ @@ -227,7 +227,7 @@ zoom_span( GLcontext *ctx, const struct sw_span *span, MEMCPY(rgbaSave, zoomed.array->rgba, zoomed.end * 4 * sizeof(GLchan)); } for (zoomed.y = r0; zoomed.y < r1; zoomed.y++) { - _mesa_write_rgba_span(ctx, &zoomed); + _swrast_write_rgba_span(ctx, &zoomed); zoomed.end = end; /* restore */ if (r1 - r0 > 1) { /* restore the colors */ @@ -241,7 +241,7 @@ zoom_span( GLcontext *ctx, const struct sw_span *span, MEMCPY(indexSave, zoomed.array->index, zoomed.end * sizeof(GLuint)); } for (zoomed.y = r0; zoomed.y < r1; zoomed.y++) { - _mesa_write_index_span(ctx, &zoomed); + _swrast_write_index_span(ctx, &zoomed); zoomed.end = end; /* restore */ if (r1 - r0 > 1) { /* restore the colors */ @@ -253,7 +253,7 @@ zoom_span( GLcontext *ctx, const struct sw_span *span, void -_mesa_write_zoomed_rgba_span( GLcontext *ctx, const struct sw_span *span, +_swrast_write_zoomed_rgba_span( GLcontext *ctx, const struct sw_span *span, CONST GLchan rgba[][4], GLint y0, GLint skipPixels ) { @@ -262,7 +262,7 @@ _mesa_write_zoomed_rgba_span( GLcontext *ctx, const struct sw_span *span, void -_mesa_write_zoomed_rgb_span( GLcontext *ctx, const struct sw_span *span, +_swrast_write_zoomed_rgb_span( GLcontext *ctx, const struct sw_span *span, CONST GLchan rgb[][3], GLint y0, GLint skipPixels ) { @@ -271,7 +271,7 @@ _mesa_write_zoomed_rgb_span( GLcontext *ctx, const struct sw_span *span, void -_mesa_write_zoomed_index_span( GLcontext *ctx, const struct sw_span *span, +_swrast_write_zoomed_index_span( GLcontext *ctx, const struct sw_span *span, GLint y0, GLint skipPixels ) { zoom_span(ctx, span, (const GLvoid *) span->array->index, y0, @@ -283,7 +283,7 @@ _mesa_write_zoomed_index_span( GLcontext *ctx, const struct sw_span *span, * As above, but write stencil values. */ void -_mesa_write_zoomed_stencil_span( GLcontext *ctx, +_swrast_write_zoomed_stencil_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLstencil stencil[], GLint y0, GLint skipPixels ) @@ -365,6 +365,6 @@ _mesa_write_zoomed_stencil_span( GLcontext *ctx, /* write the span */ for (r=r0; r