diff options
author | Keith Whitwell <[email protected]> | 2001-03-19 02:25:35 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2001-03-19 02:25:35 +0000 |
commit | 709892459922a32096fe9dd8261d0d92337bb02f (patch) | |
tree | 87782215d4531207c97b236a5dfa0d15c45aef8a /src/mesa/swrast/s_span.c | |
parent | d9bf6ccce9f5fea22d6a478c4afafea3c3c525c5 (diff) |
Split driver struct into swrast/tnl/core components.
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r-- | src/mesa/swrast/s_span.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index e7659d51a7f..d26b0421874 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.11 2001/03/12 00:48:42 gareth Exp $ */ +/* $Id: s_span.c,v 1.12 2001/03/19 02:25:36 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -127,6 +127,7 @@ static void multi_write_index_span( GLcontext *ctx, GLuint n, GLint x, GLint y, const GLuint indexes[], const GLubyte mask[] ) { + SWcontext *swrast = SWRAST_CONTEXT(ctx); GLuint bufferBit; if (ctx->Color.DrawBuffer == GL_NONE) @@ -158,7 +159,7 @@ static void multi_write_index_span( GLcontext *ctx, GLuint n, else if (ctx->Color.IndexMask != 0xffffffff) { _mesa_mask_index_span( ctx, n, x, y, indexTmp ); } - (*ctx->Driver.WriteCI32Span)( ctx, n, x, y, indexTmp, mask ); + (*swrast->Driver.WriteCI32Span)( ctx, n, x, y, indexTmp, mask ); } } @@ -261,7 +262,7 @@ void _mesa_write_index_span( GLcontext *ctx, } /* write pixels */ - (*ctx->Driver.WriteCI32Span)( ctx, n, x, y, index, mask ); + (*swrast->Driver.WriteCI32Span)( ctx, n, x, y, index, mask ); } } @@ -350,7 +351,7 @@ void _mesa_write_monoindex_span( GLcontext *ctx, else if (ctx->Color.IndexMask != 0xffffffff) { _mesa_mask_index_span( ctx, n, x, y, indexes ); } - (*ctx->Driver.WriteCI32Span)( ctx, n, x, y, indexes, mask ); + (*swrast->Driver.WriteCI32Span)( ctx, n, x, y, indexes, mask ); } } else { @@ -366,7 +367,7 @@ void _mesa_write_monoindex_span( GLcontext *ctx, } else { /* normal situation: draw to exactly one buffer */ - (*ctx->Driver.WriteMonoCISpan)( ctx, n, x, y, index, mask ); + (*swrast->Driver.WriteMonoCISpan)( ctx, n, x, y, index, mask ); } } } @@ -426,7 +427,7 @@ static void multi_write_rgba_span( GLcontext *ctx, GLuint n, _mesa_mask_rgba_span( ctx, n, x, y, rgbaTmp ); } - (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y, + (*swrast->Driver.WriteRGBASpan)( ctx, n, x, y, (const GLchan (*)[4]) rgbaTmp, mask ); if (swrast->_RasterMask & ALPHABUF_BIT) { _mesa_write_alpha_span( ctx, n, x, y, @@ -553,7 +554,7 @@ void _mesa_write_rgba_span( GLcontext *ctx, } /* write pixels */ - (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y, + (*swrast->Driver.WriteRGBASpan)( ctx, n, x, y, (const GLchan (*)[4]) rgba, write_all ? Null : mask ); @@ -693,7 +694,7 @@ void _mesa_write_monocolor_span( GLcontext *ctx, } /* write pixels */ - (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y, + (*swrast->Driver.WriteRGBASpan)( ctx, n, x, y, (const GLchan (*)[4]) rgba, write_all ? Null : mask ); if (swrast->_RasterMask & ALPHABUF_BIT) { @@ -718,7 +719,7 @@ void _mesa_write_monocolor_span( GLcontext *ctx, (const GLchan (*)[4]) rgba, mask ); } else { - (*ctx->Driver.WriteMonoRGBASpan)( ctx, n, x, y, color, mask ); + (*swrast->Driver.WriteMonoRGBASpan)( ctx, n, x, y, color, mask ); if (swrast->_RasterMask & ALPHABUF_BIT) { _mesa_write_mono_alpha_span( ctx, n, x, y, (GLchan) color[ACOMP], write_all ? Null : mask ); @@ -887,7 +888,7 @@ void _mesa_write_texture_span( GLcontext *ctx, _mesa_mask_rgba_span( ctx, n, x, y, rgba ); } - (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y, (const GLchan (*)[4])rgba, + (*swrast->Driver.WriteRGBASpan)( ctx, n, x, y, (const GLchan (*)[4])rgba, write_all ? Null : mask ); if (swrast->_RasterMask & ALPHABUF_BIT) { _mesa_write_alpha_span( ctx, n, x, y, (const GLchan (*)[4]) rgba, @@ -1042,7 +1043,7 @@ _mesa_write_multitexture_span( GLcontext *ctx, _mesa_mask_rgba_span( ctx, n, x, y, rgba ); } - (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y, (const GLchan (*)[4])rgba, + (*swrast->Driver.WriteRGBASpan)( ctx, n, x, y, (const GLchan (*)[4])rgba, write_all ? Null : mask ); if (swrast->_RasterMask & ALPHABUF_BIT) { _mesa_write_alpha_span( ctx, n, x, y, (const GLchan (*)[4])rgba, @@ -1061,6 +1062,7 @@ void _mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLchan rgba[][4] ) { + SWcontext *swrast = SWRAST_CONTEXT(ctx); if (y < 0 || y >= buffer->Height || x + (GLint) n < 0 || x >= buffer->Width) { /* completely above, below, or right */ @@ -1096,7 +1098,7 @@ void _mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, length = (GLint) n; } - (*ctx->Driver.ReadRGBASpan)( ctx, length, x + skip, y, rgba + skip ); + (*swrast->Driver.ReadRGBASpan)( ctx, length, x + skip, y, rgba + skip ); if (buffer->UseSoftwareAlphaBuffers) { _mesa_read_alpha_span( ctx, length, x + skip, y, rgba + skip ); } @@ -1113,6 +1115,7 @@ void _mesa_read_rgba_span( GLcontext *ctx, GLframebuffer *buffer, void _mesa_read_index_span( GLcontext *ctx, GLframebuffer *buffer, GLuint n, GLint x, GLint y, GLuint indx[] ) { + SWcontext *swrast = SWRAST_CONTEXT(ctx); if (y < 0 || y >= buffer->Height || x + (GLint) n < 0 || x >= buffer->Width) { /* completely above, below, or right */ @@ -1147,6 +1150,6 @@ void _mesa_read_index_span( GLcontext *ctx, GLframebuffer *buffer, length = (GLint) n; } - (*ctx->Driver.ReadCI32Span)( ctx, length, skip + x, y, indx + skip ); + (*swrast->Driver.ReadCI32Span)( ctx, length, skip + x, y, indx + skip ); } } |