swrast: Remove support for rendering points into a color-index buffer
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 24 Feb 2010 23:20:11 +0000 (15:20 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 3 Mar 2010 20:37:03 +0000 (12:37 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/swrast/s_points.c

index a9a704a16eea1565d82b50f6851468e6b70ad4fc..1663ece82941de2f5111a82453fe24f6edb06b12 100644 (file)
@@ -244,7 +244,6 @@ static void
 smooth_point(GLcontext *ctx, const SWvertex *vert)
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
-   const GLboolean ciMode = !ctx->Visual.rgbMode;
    SWspan span;
    GLfloat size, alphaAtten;
 
@@ -335,10 +334,6 @@ smooth_point(GLcontext *ctx, const SWvertex *vert)
                if (dist2 >= rmin2) {
                   /* compute partial coverage */
                   coverage = 1.0F - (dist2 - rmin2) * cscale;
-                  if (ciMode) {
-                     /* coverage in [0,15] */
-                     coverage *= 15.0;
-                  }
                }
                else {
                   /* full coverage */
@@ -369,7 +364,6 @@ static void
 large_point(GLcontext *ctx, const SWvertex *vert)
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
-   const GLboolean ciMode = !ctx->Visual.rgbMode;
    SWspan span;
    GLfloat size;
 
@@ -389,22 +383,15 @@ large_point(GLcontext *ctx, const SWvertex *vert)
    span.arrayMask = SPAN_XY;
    span.facing = swrast->PointLineFacing;
 
-   if (ciMode) {
-      span.interpMask = SPAN_Z | SPAN_INDEX;
-      span.index = FloatToFixed(vert->attrib[FRAG_ATTRIB_CI][0]);
-      span.indexStep = 0;
-   }
-   else {
-      span.interpMask = SPAN_Z | SPAN_RGBA;
-      span.red   = ChanToFixed(vert->color[0]);
-      span.green = ChanToFixed(vert->color[1]);
-      span.blue  = ChanToFixed(vert->color[2]);
-      span.alpha = ChanToFixed(vert->color[3]);
-      span.redStep = 0;
-      span.greenStep = 0;
-      span.blueStep = 0;
-      span.alphaStep = 0;
-   }
+   span.interpMask = SPAN_Z | SPAN_RGBA;
+   span.red   = ChanToFixed(vert->color[0]);
+   span.green = ChanToFixed(vert->color[1]);
+   span.blue  = ChanToFixed(vert->color[2]);
+   span.alpha = ChanToFixed(vert->color[3]);
+   span.redStep = 0;
+   span.greenStep = 0;
+   span.blueStep = 0;
+   span.alphaStep = 0;
 
    /* need these for fragment programs */
    span.attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F;
@@ -466,7 +453,6 @@ static void
 pixel_point(GLcontext *ctx, const SWvertex *vert)
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
-   const GLboolean ciMode = !ctx->Visual.rgbMode;
    /*
     * Note that unlike the other functions, we put single-pixel points
     * into a special span array in order to render as many points as
@@ -480,10 +466,7 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
    /* Span init */
    span->interpMask = 0;
    span->arrayMask = SPAN_XY | SPAN_Z;
-   if (ciMode)
-      span->arrayMask |= SPAN_INDEX;
-   else
-      span->arrayMask |= SPAN_RGBA;
+   span->arrayMask |= SPAN_RGBA;
    /*span->arrayMask |= SPAN_LAMBDA;*/
    span->arrayAttribs = swrast->_ActiveAttribMask; /* we'll produce these vals */
 
@@ -497,10 +480,7 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
        (swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT)) ||
        span->facing != swrast->PointLineFacing) {
       if (span->end > 0) {
-         if (ciMode)
-            _swrast_write_index_span(ctx, span);
-         else
-            _swrast_write_rgba_span(ctx, span);
+        _swrast_write_rgba_span(ctx, span);
          span->end = 0;
       }
    }
@@ -510,15 +490,11 @@ pixel_point(GLcontext *ctx, const SWvertex *vert)
    span->facing = swrast->PointLineFacing;
 
    /* fragment attributes */
-   if (ciMode) {
-      span->array->index[count] = (GLuint) vert->attrib[FRAG_ATTRIB_CI][0];
-   }
-   else {
-      span->array->rgba[count][RCOMP] = vert->color[0];
-      span->array->rgba[count][GCOMP] = vert->color[1];
-      span->array->rgba[count][BCOMP] = vert->color[2];
-      span->array->rgba[count][ACOMP] = vert->color[3];
-   }
+   span->array->rgba[count][RCOMP] = vert->color[0];
+   span->array->rgba[count][GCOMP] = vert->color[1];
+   span->array->rgba[count][BCOMP] = vert->color[2];
+   span->array->rgba[count][ACOMP] = vert->color[3];
+
    ATTRIB_LOOP_BEGIN
       COPY_4V(span->array->attribs[attr][count], vert->attrib[attr]);
    ATTRIB_LOOP_END