From: Brian Paul Date: Thu, 2 Jun 2005 04:09:05 +0000 (+0000) Subject: Remove last of the old span code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3fe9c40cb27b23d44e938a19fbf4f21e1b1e288b;p=mesa.git Remove last of the old span code. --- diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index b0af0f95d4f..5621d0c8aa9 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -521,13 +521,7 @@ accum_return(GLcontext *ctx, GLfloat value, if (masking) { _swrast_mask_rgba_array(ctx, rb, width, xpos, ypos + i, rgba); } -#if OLD_RENDERBUFFER - if (swrast->Driver.WriteRGBASpan) - swrast->Driver.WriteRGBASpan(ctx, rb, width, xpos, ypos + i, - (const GLchan (*)[4]) rgba, NULL); - else -#endif - rb->PutRow(ctx, rb, width, xpos, ypos + i, rgba, NULL); + rb->PutRow(ctx, rb, width, xpos, ypos + i, rgba, NULL); } } } diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c index f15c95710dc..d34ecacbb23 100644 --- a/src/mesa/swrast/s_blend.c +++ b/src/mesa/swrast/s_blend.c @@ -849,7 +849,6 @@ void _swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb, const struct sw_span *span, GLchan rgba[][4]) { - SWcontext *swrast = SWRAST_CONTEXT(ctx); GLchan framebuffer[MAX_WIDTH][4]; ASSERT(span->end <= MAX_WIDTH); @@ -859,15 +858,8 @@ _swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb, /* Read span of current frame buffer pixels */ if (span->arrayMask & SPAN_XY) { /* array of x/y pixel coords */ -#if OLD_RENDERBUFFER - if (swrast->Driver.ReadRGBAPixels) - (*swrast->Driver.ReadRGBAPixels)( ctx, rb, span->end, - span->array->x, span->array->y, - framebuffer, span->array->mask ); - else -#endif - rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y, - framebuffer); + rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y, + framebuffer); } else { /* horizontal run of pixels */ diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index 3d6d91de51d..7bae7ed99e0 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -2,7 +2,7 @@ * Mesa 3-D graphics library * Version: 6.3 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2005 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"), @@ -130,7 +130,6 @@ static void copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLint width, GLint height, GLint destx, GLint desty) { - SWcontext *swrast = SWRAST_CONTEXT(ctx); struct gl_renderbuffer *drawRb = NULL; GLboolean quick_draw; GLint row; @@ -242,14 +241,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, dy = desty + row; if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) { -#if OLD_RENDERBUFFER - if (swrast->Driver.WriteRGBASpan) - swrast->Driver.WriteRGBASpan(ctx, drawRb, width, destx, dy, - (const GLchan (*)[4]) span.array->rgba, NULL); - else -#endif - drawRb->PutRow(ctx, drawRb, width, destx, dy, - span.array->rgba, NULL); + drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL); } else if (zoom) { span.x = destx; @@ -278,7 +270,6 @@ static void copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLint width, GLint height, GLint destx, GLint desty) { - SWcontext *swrast = SWRAST_CONTEXT(ctx); struct gl_renderbuffer *drawRb; GLchan *tmpImage,*p; GLboolean quick_draw; @@ -413,14 +404,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, /* Write color span */ if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) { -#if OLD_RENDERBUFFER - if (swrast->Driver.WriteRGBASpan) - swrast->Driver.WriteRGBASpan(ctx, drawRb, width, destx, dy, - (const GLchan (*)[4])span.array->rgba, NULL); - else -#endif - drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL); - + drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL); } else if (zoom) { span.x = destx; diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index bd9a14b1197..5860233a65b 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -792,7 +792,6 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels ) { - SWcontext *swrast = SWRAST_CONTEXT(ctx); struct gl_renderbuffer *rb = NULL; /* only used for quickDraw path */ const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0; const GLint desty = y; @@ -926,13 +925,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, /* draw the span */ if (quickDraw) { -#if OLD_RENDERBUFFER - if (swrast->Driver.WriteRGBASpan) - swrast->Driver.WriteRGBASpan(ctx, rb, span.end, span.x, span.y, - (CONST GLchan (*)[4]) span.array->rgba, NULL); - else -#endif - rb->PutRow(ctx, rb, span.end, span.x, span.y, + rb->PutRow(ctx, rb, span.end, span.x, span.y, span.array->rgba, NULL); } else if (zoom) { diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c index aabe18d9c9a..40ece9f73cb 100644 --- a/src/mesa/swrast/s_logic.c +++ b/src/mesa/swrast/s_logic.c @@ -188,14 +188,13 @@ _swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint dest[MAX_WIDTH]; ASSERT(span->end < MAX_WIDTH); + ASSERT(rb->DataType == GL_UNSIGNED_INT); /* Read dest values from frame buffer */ if (span->arrayMask & SPAN_XY) { - ASSERT(rb->DataType == GL_UNSIGNED_INT); rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y, dest); } else { - ASSERT(rb->DataType == GL_UNSIGNED_INT); rb->GetRow(ctx, rb, span->end, span->x, span->y, dest); } @@ -212,16 +211,14 @@ void _swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, const struct sw_span *span, GLchan rgba[][4]) { - SWcontext *swrast = SWRAST_CONTEXT(ctx); GLchan dest[MAX_WIDTH][4]; ASSERT(span->end < MAX_WIDTH); ASSERT(span->arrayMask & SPAN_RGBA); + ASSERT(rb->DataType == GL_UNSIGNED_INT); if (span->arrayMask & SPAN_XY) { - swrast->Driver.ReadRGBAPixels(ctx, rb, span->end, - span->array->x, span->array->y, - dest, span->array->mask); + rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y, dest); } else { _swrast_read_rgba_span(ctx, rb, span->end, span->x, span->y, dest); diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c index d5f60a69587..f58b2c20e24 100644 --- a/src/mesa/swrast/s_masking.c +++ b/src/mesa/swrast/s_masking.c @@ -42,7 +42,6 @@ void _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, const struct sw_span *span, GLchan rgba[][4]) { - SWcontext *swrast = SWRAST_CONTEXT(ctx); GLchan dest[MAX_WIDTH][4]; #if CHAN_BITS == 8 GLuint srcMask = *((GLuint*)ctx->Color.ColorMask); @@ -62,13 +61,7 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, ASSERT(span->arrayMask & SPAN_RGBA); if (span->arrayMask & SPAN_XY) { -#if OLD_RENDERBUFFER - if (swrast->Driver.ReadRGBAPixels) - swrast->Driver.ReadRGBAPixels(ctx, rb, n, span->array->x, span->array->y, - dest, span->array->mask); - else -#endif - rb->GetValues(ctx, rb, n, span->array->x, span->array->y, dest); + rb->GetValues(ctx, rb, n, span->array->x, span->array->y, dest); } else { _swrast_read_rgba_span(ctx, rb, n, span->x, span->y, dest); diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 48ec2836e8b..4b7e42b6ecb 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -148,7 +148,6 @@ _swrast_culltriangle( GLcontext *ctx, #define T_SCALE theight #define SETUP_CODE \ - SWcontext *swrast = SWRAST_CONTEXT(ctx); \ struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];\ struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \ const GLint b = obj->BaseLevel; \ @@ -178,12 +177,7 @@ _swrast_culltriangle( GLcontext *ctx, span.intTex[0] += span.intTexStep[0]; \ span.intTex[1] += span.intTexStep[1]; \ } \ - if (swrast->Driver.WriteRGBSpan) \ - swrast->Driver.WriteRGBSpan(ctx, rb, span.end, span.x, span.y, \ - (CONST GLchan (*)[3]) span.array->rgb,\ - NULL ); \ - else \ - rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL); + rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL); #include "s_tritemp.h" @@ -205,7 +199,6 @@ _swrast_culltriangle( GLcontext *ctx, #define T_SCALE theight #define SETUP_CODE \ - SWcontext *swrast = SWRAST_CONTEXT(ctx); \ struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];\ struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \ const GLint b = obj->BaseLevel; \ @@ -244,12 +237,7 @@ _swrast_culltriangle( GLcontext *ctx, span.intTex[1] += span.intTexStep[1]; \ span.z += span.zStep; \ } \ - if (swrast->Driver.WriteRGBSpan) \ - swrast->Driver.WriteRGBSpan(ctx, rb, span.end, span.x, span.y, \ - (CONST GLchan (*)[3]) span.array->rgb,\ - span.array->mask ); \ - else \ - rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL); + rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL); #include "s_tritemp.h"