Remove last of the old span code.

This commit is contained in:
Brian Paul
2005-06-02 04:09:05 +00:00
parent 13c8f985d9
commit 3fe9c40cb2
7 changed files with 13 additions and 72 deletions

View File

@@ -521,13 +521,7 @@ accum_return(GLcontext *ctx, GLfloat value,
if (masking) { if (masking) {
_swrast_mask_rgba_array(ctx, rb, width, xpos, ypos + i, rgba); _swrast_mask_rgba_array(ctx, rb, width, xpos, ypos + i, rgba);
} }
#if OLD_RENDERBUFFER rb->PutRow(ctx, rb, width, xpos, ypos + i, rgba, NULL);
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);
} }
} }
} }

View File

@@ -849,7 +849,6 @@ void
_swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb, _swrast_blend_span(GLcontext *ctx, struct gl_renderbuffer *rb,
const struct sw_span *span, GLchan rgba[][4]) const struct sw_span *span, GLchan rgba[][4])
{ {
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan framebuffer[MAX_WIDTH][4]; GLchan framebuffer[MAX_WIDTH][4];
ASSERT(span->end <= MAX_WIDTH); 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 */ /* Read span of current frame buffer pixels */
if (span->arrayMask & SPAN_XY) { if (span->arrayMask & SPAN_XY) {
/* array of x/y pixel coords */ /* array of x/y pixel coords */
#if OLD_RENDERBUFFER rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y,
if (swrast->Driver.ReadRGBAPixels) framebuffer);
(*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);
} }
else { else {
/* horizontal run of pixels */ /* horizontal run of pixels */

View File

@@ -2,7 +2,7 @@
* Mesa 3-D graphics library * Mesa 3-D graphics library
* Version: 6.3 * 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 * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * 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, copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
GLint width, GLint height, GLint destx, GLint desty) GLint width, GLint height, GLint destx, GLint desty)
{ {
SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct gl_renderbuffer *drawRb = NULL; struct gl_renderbuffer *drawRb = NULL;
GLboolean quick_draw; GLboolean quick_draw;
GLint row; GLint row;
@@ -242,14 +241,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
dy = desty + row; dy = desty + row;
if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) { if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) {
#if OLD_RENDERBUFFER drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL);
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);
} }
else if (zoom) { else if (zoom) {
span.x = destx; span.x = destx;
@@ -278,7 +270,6 @@ static void
copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
GLint width, GLint height, GLint destx, GLint desty) GLint width, GLint height, GLint destx, GLint desty)
{ {
SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct gl_renderbuffer *drawRb; struct gl_renderbuffer *drawRb;
GLchan *tmpImage,*p; GLchan *tmpImage,*p;
GLboolean quick_draw; GLboolean quick_draw;
@@ -413,14 +404,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
/* Write color span */ /* Write color span */
if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) { if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) {
#if OLD_RENDERBUFFER drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL);
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);
} }
else if (zoom) { else if (zoom) {
span.x = destx; span.x = destx;

View File

@@ -792,7 +792,6 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
const struct gl_pixelstore_attrib *unpack, const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels ) const GLvoid *pixels )
{ {
SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct gl_renderbuffer *rb = NULL; /* only used for quickDraw path */ struct gl_renderbuffer *rb = NULL; /* only used for quickDraw path */
const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0; const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0;
const GLint desty = y; const GLint desty = y;
@@ -926,13 +925,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
/* draw the span */ /* draw the span */
if (quickDraw) { if (quickDraw) {
#if OLD_RENDERBUFFER rb->PutRow(ctx, rb, span.end, span.x, span.y,
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,
span.array->rgba, NULL); span.array->rgba, NULL);
} }
else if (zoom) { else if (zoom) {

View File

@@ -188,14 +188,13 @@ _swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
GLuint dest[MAX_WIDTH]; GLuint dest[MAX_WIDTH];
ASSERT(span->end < MAX_WIDTH); ASSERT(span->end < MAX_WIDTH);
ASSERT(rb->DataType == GL_UNSIGNED_INT);
/* Read dest values from frame buffer */ /* Read dest values from frame buffer */
if (span->arrayMask & SPAN_XY) { if (span->arrayMask & SPAN_XY) {
ASSERT(rb->DataType == GL_UNSIGNED_INT);
rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y, dest); rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y, dest);
} }
else { else {
ASSERT(rb->DataType == GL_UNSIGNED_INT);
rb->GetRow(ctx, rb, span->end, span->x, span->y, dest); 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, _swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
const struct sw_span *span, GLchan rgba[][4]) const struct sw_span *span, GLchan rgba[][4])
{ {
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan dest[MAX_WIDTH][4]; GLchan dest[MAX_WIDTH][4];
ASSERT(span->end < MAX_WIDTH); ASSERT(span->end < MAX_WIDTH);
ASSERT(span->arrayMask & SPAN_RGBA); ASSERT(span->arrayMask & SPAN_RGBA);
ASSERT(rb->DataType == GL_UNSIGNED_INT);
if (span->arrayMask & SPAN_XY) { if (span->arrayMask & SPAN_XY) {
swrast->Driver.ReadRGBAPixels(ctx, rb, span->end, rb->GetValues(ctx, rb, span->end, span->array->x, span->array->y, dest);
span->array->x, span->array->y,
dest, span->array->mask);
} }
else { else {
_swrast_read_rgba_span(ctx, rb, span->end, span->x, span->y, dest); _swrast_read_rgba_span(ctx, rb, span->end, span->x, span->y, dest);

View File

@@ -42,7 +42,6 @@ void
_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
const struct sw_span *span, GLchan rgba[][4]) const struct sw_span *span, GLchan rgba[][4])
{ {
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLchan dest[MAX_WIDTH][4]; GLchan dest[MAX_WIDTH][4];
#if CHAN_BITS == 8 #if CHAN_BITS == 8
GLuint srcMask = *((GLuint*)ctx->Color.ColorMask); 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); ASSERT(span->arrayMask & SPAN_RGBA);
if (span->arrayMask & SPAN_XY) { if (span->arrayMask & SPAN_XY) {
#if OLD_RENDERBUFFER rb->GetValues(ctx, rb, n, span->array->x, span->array->y, dest);
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);
} }
else { else {
_swrast_read_rgba_span(ctx, rb, n, span->x, span->y, dest); _swrast_read_rgba_span(ctx, rb, n, span->x, span->y, dest);

View File

@@ -148,7 +148,6 @@ _swrast_culltriangle( GLcontext *ctx,
#define T_SCALE theight #define T_SCALE theight
#define SETUP_CODE \ #define SETUP_CODE \
SWcontext *swrast = SWRAST_CONTEXT(ctx); \
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];\ struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];\
struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \ struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \
const GLint b = obj->BaseLevel; \ const GLint b = obj->BaseLevel; \
@@ -178,12 +177,7 @@ _swrast_culltriangle( GLcontext *ctx,
span.intTex[0] += span.intTexStep[0]; \ span.intTex[0] += span.intTexStep[0]; \
span.intTex[1] += span.intTexStep[1]; \ span.intTex[1] += span.intTexStep[1]; \
} \ } \
if (swrast->Driver.WriteRGBSpan) \ rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL);
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);
#include "s_tritemp.h" #include "s_tritemp.h"
@@ -205,7 +199,6 @@ _swrast_culltriangle( GLcontext *ctx,
#define T_SCALE theight #define T_SCALE theight
#define SETUP_CODE \ #define SETUP_CODE \
SWcontext *swrast = SWRAST_CONTEXT(ctx); \
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];\ struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];\
struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \ struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \
const GLint b = obj->BaseLevel; \ const GLint b = obj->BaseLevel; \
@@ -244,12 +237,7 @@ _swrast_culltriangle( GLcontext *ctx,
span.intTex[1] += span.intTexStep[1]; \ span.intTex[1] += span.intTexStep[1]; \
span.z += span.zStep; \ span.z += span.zStep; \
} \ } \
if (swrast->Driver.WriteRGBSpan) \ rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, span.array->rgb, NULL);
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);
#include "s_tritemp.h" #include "s_tritemp.h"