Remove last of the old span code.
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Jun 2005 04:09:05 +0000 (04:09 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Jun 2005 04:09:05 +0000 (04:09 +0000)
src/mesa/swrast/s_accum.c
src/mesa/swrast/s_blend.c
src/mesa/swrast/s_copypix.c
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_logic.c
src/mesa/swrast/s_masking.c
src/mesa/swrast/s_triangle.c

index b0af0f95d4f94a41eaaabe79f4322c1c9c536ebc..5621d0c8aa97cb63b04d51c50c2fe92047eab04e 100644 (file)
@@ -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);
          }
       }
    }
index f15c95710dc4ea6a5facd3f010c329eb436820b2..d34ecacbb2360e3f92ffc0e57ae7b598a69e1423 100644 (file)
@@ -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 */
index 3d6d91de51dd1afde58f3b42134205e58ebae270..7bae7ed99e0808cd7d7161e26c6ad1ea59f396a3 100644 (file)
@@ -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;
index bd9a14b1197a86071260f282b70f8a9b1a38c9a0..5860233a65b0d19166ee88f626f53642f3440fac 100644 (file)
@@ -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) {
index aabe18d9c9a24f1025168cfc640a103a93098a50..40ece9f73cb017156c1b01c7392de652bf5542e3 100644 (file)
@@ -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);
index d5f60a69587fef36c091ed7dedaafaf4cbf23ef9..f58b2c20e24c4c4d4cc5f156a76276e4dec98c91 100644 (file)
@@ -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);
index 48ec2836e8b0f7ccecc93b03d36043cd27af7a02..4b7e42b6ecb47a65c64a719226b5a0e9c53648d1 100644 (file)
@@ -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"