summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-06-02 04:09:05 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-06-02 04:09:05 +0000
commit3fe9c40cb27b23d44e938a19fbf4f21e1b1e288b (patch)
treea282265070f1781be7a1427d1141d2dc02acc23e
parent13c8f985d96fa7dda0fd71dc4f656ce01dcdbe85 (diff)
Remove last of the old span code.
-rw-r--r--src/mesa/swrast/s_accum.c8
-rw-r--r--src/mesa/swrast/s_blend.c12
-rw-r--r--src/mesa/swrast/s_copypix.c22
-rw-r--r--src/mesa/swrast/s_drawpix.c9
-rw-r--r--src/mesa/swrast/s_logic.c9
-rw-r--r--src/mesa/swrast/s_masking.c9
-rw-r--r--src/mesa/swrast/s_triangle.c16
7 files changed, 13 insertions, 72 deletions
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index b0af0f95d4..5621d0c8aa 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 f15c95710d..d34ecacbb2 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 3d6d91de51..7bae7ed99e 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 bd9a14b119..5860233a65 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 aabe18d9c9..40ece9f73c 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 d5f60a6958..f58b2c20e2 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 48ec2836e8..4b7e42b6ec 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"