diff options
author | Jouk <joukj@tarantella.(none)> | 2007-06-08 13:38:24 +0200 |
---|---|---|
committer | Jouk <joukj@tarantella.(none)> | 2007-06-08 13:38:24 +0200 |
commit | 55f8b7053065ce88296608071feed6f9540f6c0d (patch) | |
tree | 86ac301ed5805c895985040caf56f857de017233 /src/mesa/swrast/s_drawpix.c | |
parent | 518f9168862b2096278ae14a65c8c854c208e004 (diff) | |
parent | 7b559a91028d297b34df9ec939bd4d00fad6027c (diff) |
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa
Diffstat (limited to 'src/mesa/swrast/s_drawpix.c')
-rw-r--r-- | src/mesa/swrast/s_drawpix.c | 43 |
1 files changed, 9 insertions, 34 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index cd5b7bc2935..d971d90fb9a 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -71,13 +71,7 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y, } INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_RGBA); - _swrast_span_default_secondary_color(ctx, &span); - if (ctx->Depth.Test) - _swrast_span_default_z(ctx, &span); - if (swrast->_FogEnabled) - _swrast_span_default_fog(ctx, &span); - if (ctx->Texture._EnabledCoordUnits) - _swrast_span_default_texcoords(ctx, &span); + _swrast_span_default_attribs(ctx, &span); /* copy input params since clipping may change them */ unpack = *userUnpack; @@ -274,9 +268,9 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y, for (row = 0; row < drawHeight; row++) { ASSERT(drawWidth <= MAX_WIDTH); _mesa_map_ci8_to_rgba8(ctx, drawWidth, src, - span.array->color.sz1.rgba); + span.array->rgba8); rb->PutRow(ctx, rb, drawWidth, destX, destY, - span.array->color.sz1.rgba, NULL); + span.array->rgba8, NULL); src += unpack.RowLength; destY += yStep; } @@ -287,12 +281,12 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y, for (row = 0; row < drawHeight; row++) { ASSERT(drawWidth <= MAX_WIDTH); _mesa_map_ci8_to_rgba8(ctx, drawWidth, src, - span.array->color.sz1.rgba); + span.array->rgba8); span.x = destX; span.y = destY; span.end = drawWidth; _swrast_write_zoomed_rgba_span(ctx, imgX, imgY, &span, - span.array->color.sz1.rgba); + span.array->rgba8); src += unpack.RowLength; destY++; } @@ -333,18 +327,13 @@ draw_index_pixels( GLcontext *ctx, GLint x, GLint y, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels ) { - SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLint imgX = x, imgY = y; const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0; GLint row, skipPixels; SWspan span; INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_INDEX); - - if (ctx->Depth.Test) - _swrast_span_default_z(ctx, &span); - if (swrast->_FogEnabled) - _swrast_span_default_fog(ctx, &span); + _swrast_span_default_attribs(ctx, &span); /* * General solution @@ -433,20 +422,13 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels ) { - SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLboolean scaleOrBias = ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0; const GLboolean zoom = ctx->Pixel.ZoomX != 1.0 || ctx->Pixel.ZoomY != 1.0; SWspan span; INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_Z); - - _swrast_span_default_color(ctx, &span); - _swrast_span_default_secondary_color(ctx, &span); - if (swrast->_FogEnabled) - _swrast_span_default_fog(ctx, &span); - if (ctx->Texture._EnabledCoordUnits) - _swrast_span_default_texcoords(ctx, &span); + _swrast_span_default_attribs(ctx, &span); if (type == GL_UNSIGNED_SHORT && ctx->DrawBuffer->Visual.depthBits == 16 @@ -550,7 +532,6 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels ) { - SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLint imgX = x, imgY = y; const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0; GLfloat *convImage = NULL; @@ -562,14 +543,8 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, unpack, pixels)) return; - INIT_SPAN(span, GL_BITMAP, 0, 0, SPAN_RGBA); - _swrast_span_default_secondary_color(ctx, &span); - if (ctx->Depth.Test) - _swrast_span_default_z(ctx, &span); - if (swrast->_FogEnabled) - _swrast_span_default_fog(ctx, &span); - if (ctx->Texture._EnabledCoordUnits) - _swrast_span_default_texcoords(ctx, &span); + INIT_SPAN(span, GL_BITMAP, 0, 0x0, SPAN_RGBA); + _swrast_span_default_attribs(ctx, &span); if (ctx->Pixel.Convolution2DEnabled || ctx->Pixel.Separable2DEnabled) { /* Convolution has to be handled specially. We'll create an |