summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-02-24 15:22:56 -0800
committerIan Romanick <[email protected]>2010-03-03 12:37:03 -0800
commite6df80184b0c7e83eba382b3161ba11db497c55d (patch)
treecc779050e16694f0af4b869d6d74fab97e50f95c /src/mesa/swrast
parentdbe901ceb01e48ba7d79fd9245b9d339ef17c692 (diff)
swrast: Remove support for rendering lines into a color-index buffer
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_lines.c48
-rw-r--r--src/mesa/swrast/s_linetemp.h18
2 files changed, 5 insertions, 61 deletions
diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c
index cff36042cbb..7db5af4ae1c 100644
--- a/src/mesa/swrast/s_lines.c
+++ b/src/mesa/swrast/s_lines.c
@@ -87,10 +87,7 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
for (i = 0; i < span->end; i++)
y[i]++;
}
- if (ctx->Visual.rgbMode)
- _swrast_write_rgba_span(ctx, span);
- else
- _swrast_write_index_span(ctx, span);
+ _swrast_write_rgba_span(ctx, span);
}
}
else {
@@ -106,10 +103,7 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
for (i = 0; i < span->end; i++)
x[i]++;
}
- if (ctx->Visual.rgbMode)
- _swrast_write_rgba_span(ctx, span);
- else
- _swrast_write_index_span(ctx, span);
+ _swrast_write_rgba_span(ctx, span);
}
}
}
@@ -120,12 +114,6 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
/***** Rasterization *****/
/**********************************************************************/
-/* Simple color index line (no stipple, width=1, no Z, no fog, no tex)*/
-#define NAME simple_no_z_ci_line
-#define INTERP_INDEX
-#define RENDER_SPAN(span) _swrast_write_index_span(ctx, &span)
-#include "s_linetemp.h"
-
/* Simple RGBA index line (no stipple, width=1, no Z, no fog, no tex)*/
#define NAME simple_no_z_rgba_line
#define INTERP_RGBA
@@ -133,25 +121,6 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor )
#include "s_linetemp.h"
-/* Z, fog, wide, stipple color index line */
-#define NAME ci_line
-#define INTERP_INDEX
-#define INTERP_Z
-#define INTERP_ATTRIBS /* for fog */
-#define RENDER_SPAN(span) \
- if (ctx->Line.StippleFlag) { \
- span.arrayMask |= SPAN_MASK; \
- compute_stipple_mask(ctx, span.end, span.array->mask); \
- } \
- if (ctx->Line.Width > 1.0) { \
- draw_wide_line(ctx, &span, (GLboolean)(dx > dy)); \
- } \
- else { \
- _swrast_write_index_span(ctx, &span); \
- }
-#include "s_linetemp.h"
-
-
/* Z, fog, wide, stipple RGBA line */
#define NAME rgba_line
#define INTERP_RGBA
@@ -256,7 +225,6 @@ void
_swrast_choose_line( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLboolean rgbmode = ctx->Visual.rgbMode;
GLboolean specular = (ctx->Fog.ColorSumEnabled ||
(ctx->Light.Enabled &&
ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR));
@@ -277,23 +245,17 @@ _swrast_choose_line( GLcontext *ctx )
|| ctx->Line.Width != 1.0
|| ctx->Line.StippleFlag) {
/* no texture, but Z, fog, width>1, stipple, etc. */
- if (rgbmode)
#if CHAN_BITS == 32
- USE(general_line);
+ USE(general_line);
#else
- USE(rgba_line);
+ USE(rgba_line);
#endif
- else
- USE(ci_line);
}
else {
ASSERT(!ctx->Depth.Test);
ASSERT(ctx->Line.Width == 1.0);
/* simple lines */
- if (rgbmode)
- USE(simple_no_z_rgba_line);
- else
- USE(simple_no_z_ci_line);
+ USE(simple_no_z_rgba_line);
}
}
else if (ctx->RenderMode == GL_FEEDBACK) {
diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h
index 1abf8d6c7f3..182f962e1eb 100644
--- a/src/mesa/swrast/s_linetemp.h
+++ b/src/mesa/swrast/s_linetemp.h
@@ -31,8 +31,6 @@
* The following macros may be defined to indicate what auxillary information
* must be interplated along the line:
* INTERP_Z - if defined, interpolate Z values
- * INTERP_RGBA - if defined, interpolate RGBA values
- * INTERP_INDEX - if defined, interpolate color index values
* INTERP_ATTRIBS - if defined, interpolate attribs (texcoords, varying, etc)
*
* When one can directly address pixels in the color buffer the following
@@ -223,7 +221,6 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
/*
* Span setup: compute start and step values for all interpolated values.
*/
-#ifdef INTERP_RGBA
interpFlags |= SPAN_RGBA;
if (ctx->Light.ShadeModel == GL_SMOOTH) {
span.red = ChanToFixed(vert0->color[0]);
@@ -245,19 +242,6 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
span.blueStep = 0;
span.alphaStep = 0;
}
-#endif
-#ifdef INTERP_INDEX
- interpFlags |= SPAN_INDEX;
- if (ctx->Light.ShadeModel == GL_SMOOTH) {
- span.index = FloatToFixed(vert0->attrib[FRAG_ATTRIB_CI][0]);
- span.indexStep = FloatToFixed( vert1->attrib[FRAG_ATTRIB_CI][0]
- - vert0->attrib[FRAG_ATTRIB_CI][0]) / numPixels;
- }
- else {
- span.index = FloatToFixed(vert1->attrib[FRAG_ATTRIB_CI][0]);
- span.indexStep = 0;
- }
-#endif
#if defined(INTERP_Z) || defined(DEPTH_TYPE)
interpFlags |= SPAN_Z;
{
@@ -407,9 +391,7 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 )
#undef NAME
#undef INTERP_Z
-#undef INTERP_RGBA
#undef INTERP_ATTRIBS
-#undef INTERP_INDEX
#undef PIXEL_ADDRESS
#undef PIXEL_TYPE
#undef DEPTH_TYPE