aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_lines.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-12 09:53:17 +0000
committermarha <marha@users.sourceforge.net>2010-04-12 09:53:17 +0000
commit29b86f9852b2b7ecc31cdfee56679537e40bc6e2 (patch)
tree1e6ec8ccf2dbf773260a1953b8e13c49f9b7c5f5 /mesalib/src/mesa/swrast/s_lines.c
parent529236591df7366479a6fac30b387667678fd1ba (diff)
downloadvcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.tar.gz
vcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.tar.bz2
vcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.zip
svn merge -r524:HEAD "^/branches/released" .
Diffstat (limited to 'mesalib/src/mesa/swrast/s_lines.c')
-rw-r--r--mesalib/src/mesa/swrast/s_lines.c51
1 files changed, 6 insertions, 45 deletions
diff --git a/mesalib/src/mesa/swrast/s_lines.c b/mesalib/src/mesa/swrast/s_lines.c
index 23cb9b57e..7db5af4ae 100644
--- a/mesalib/src/mesa/swrast/s_lines.c
+++ b/mesalib/src/mesa/swrast/s_lines.c
@@ -29,7 +29,6 @@
#include "main/macros.h"
#include "s_aaline.h"
#include "s_context.h"
-#include "s_depth.h"
#include "s_feedback.h"
#include "s_lines.h"
#include "s_span.h"
@@ -88,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 {
@@ -107,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);
}
}
}
@@ -121,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
@@ -134,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
@@ -234,7 +202,7 @@ static const char *lineFuncName = NULL;
#define USE(lineFunc) \
do { \
lineFuncName = #lineFunc; \
- /*_mesa_printf("%s\n", lineFuncName);*/ \
+ /*printf("%s\n", lineFuncName);*/ \
swrast->Line = lineFunc; \
} while (0)
@@ -257,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));
@@ -278,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) {