summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast_setup
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast_setup')
-rw-r--r--src/mesa/swrast_setup/ss_context.c27
-rw-r--r--src/mesa/swrast_setup/ss_context.h6
-rw-r--r--src/mesa/swrast_setup/ss_triangle.c101
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h184
-rw-r--r--src/mesa/swrast_setup/swrast_setup.h13
5 files changed, 70 insertions, 261 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 84c313db8eb..408438ca0b7 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -1,4 +1,4 @@
-/* $Id: ss_context.c,v 1.5 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: ss_context.c,v 1.6 2001/01/05 02:26:49 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -45,25 +45,24 @@
*/
static void
_swsetup_validate_quad( GLcontext *ctx, GLuint v0, GLuint v1,
- GLuint v2, GLuint v3, GLuint pv )
+ GLuint v2, GLuint v3 )
{
_swsetup_choose_trifuncs( ctx );
- SWSETUP_CONTEXT(ctx)->Quad( ctx, v0, v1, v2, v3, pv );
+ SWSETUP_CONTEXT(ctx)->Quad( ctx, v0, v1, v2, v3 );
}
static void
-_swsetup_validate_triangle( GLcontext *ctx, GLuint v0, GLuint v1,
- GLuint v2, GLuint pv )
+_swsetup_validate_triangle( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2 )
{
_swsetup_choose_trifuncs( ctx );
- SWSETUP_CONTEXT(ctx)->Triangle( ctx, v0, v1, v2, pv );
+ SWSETUP_CONTEXT(ctx)->Triangle( ctx, v0, v1, v2 );
}
static void
-_swsetup_validate_line( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv )
+_swsetup_validate_line( GLcontext *ctx, GLuint v0, GLuint v1 )
{
_swsetup_choose_trifuncs( ctx );
- SWSETUP_CONTEXT(ctx)->Line( ctx, v0, v1, pv );
+ SWSETUP_CONTEXT(ctx)->Line( ctx, v0, v1 );
}
@@ -129,22 +128,22 @@ _swsetup_invalidate_state( GLcontext *ctx, GLuint new_state )
*/
void
_swsetup_Quad( GLcontext *ctx, GLuint v0, GLuint v1,
- GLuint v2, GLuint v3, GLuint pv )
+ GLuint v2, GLuint v3 )
{
- SWSETUP_CONTEXT(ctx)->Quad( ctx, v0, v1, v2, v3, pv );
+ SWSETUP_CONTEXT(ctx)->Quad( ctx, v0, v1, v2, v3 );
}
void
_swsetup_Triangle( GLcontext *ctx, GLuint v0, GLuint v1,
- GLuint v2, GLuint pv )
+ GLuint v2 )
{
- SWSETUP_CONTEXT(ctx)->Triangle( ctx, v0, v1, v2, pv );
+ SWSETUP_CONTEXT(ctx)->Triangle( ctx, v0, v1, v2 );
}
void
-_swsetup_Line( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv )
+_swsetup_Line( GLcontext *ctx, GLuint v0, GLuint v1 )
{
- SWSETUP_CONTEXT(ctx)->Line( ctx, v0, v1, pv );
+ SWSETUP_CONTEXT(ctx)->Line( ctx, v0, v1 );
}
diff --git a/src/mesa/swrast_setup/ss_context.h b/src/mesa/swrast_setup/ss_context.h
index f4dcb4e7d10..601ae9eb34c 100644
--- a/src/mesa/swrast_setup/ss_context.h
+++ b/src/mesa/swrast_setup/ss_context.h
@@ -44,12 +44,12 @@ typedef struct {
GLuint start, GLuint end, GLuint new_inputs );
void (*Quad)( GLcontext *ctx, GLuint v0, GLuint v1,
- GLuint v2, GLuint v3, GLuint pv );
+ GLuint v2, GLuint v3 );
void (*Triangle)( GLcontext *ctx, GLuint v0, GLuint v1,
- GLuint v2, GLuint pv );
+ GLuint v2 );
- void (*Line)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv );
+ void (*Line)( GLcontext *ctx, GLuint v0, GLuint v1 );
void (*Points)( GLcontext *ctx, GLuint first, GLuint last );
diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c
index a3f8cd6cec5..5fd5cd0f57f 100644
--- a/src/mesa/swrast_setup/ss_triangle.c
+++ b/src/mesa/swrast_setup/ss_triangle.c
@@ -34,15 +34,13 @@
#include "ss_triangle.h"
#include "ss_context.h"
-#define SS_FLAT_BIT 0x1
+#define SS_RGBA_BIT 0x1
#define SS_OFFSET_BIT 0x2
#define SS_TWOSIDE_BIT 0x4
-#define SS_UNFILLED_BIT 0x10
-#define SS_RGBA_BIT 0x20
-#define SS_MAX_TRIFUNC 0x80
+#define SS_UNFILLED_BIT 0x8
+#define SS_MAX_TRIFUNC 0x10
static triangle_func tri_tab[SS_MAX_TRIFUNC];
-static line_func line_tab[SS_MAX_TRIFUNC];
static quad_func quad_tab[SS_MAX_TRIFUNC];
@@ -54,168 +52,88 @@ static quad_func quad_tab[SS_MAX_TRIFUNC];
#define TAG(x) x
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT)
-#define TAG(x) x##_flat
-#include "ss_tritmp.h"
-
#define IND (SS_OFFSET_BIT)
#define TAG(x) x##_offset
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_OFFSET_BIT)
-#define TAG(x) x##_flat_offset
-#include "ss_tritmp.h"
-
#define IND (SS_TWOSIDE_BIT)
#define TAG(x) x##_twoside
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_TWOSIDE_BIT)
-#define TAG(x) x##_flat_twoside
-#include "ss_tritmp.h"
-
#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT)
#define TAG(x) x##_offset_twoside
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_OFFSET_BIT|SS_TWOSIDE_BIT)
-#define TAG(x) x##_flat_offset_twoside
-#include "ss_tritmp.h"
-
#define IND (SS_UNFILLED_BIT)
#define TAG(x) x##_unfilled
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_UNFILLED_BIT)
-#define TAG(x) x##_flat_unfilled
-#include "ss_tritmp.h"
-
#define IND (SS_OFFSET_BIT|SS_UNFILLED_BIT)
#define TAG(x) x##_offset_unfilled
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_OFFSET_BIT|SS_UNFILLED_BIT)
-#define TAG(x) x##_flat_offset_unfilled
-#include "ss_tritmp.h"
-
#define IND (SS_TWOSIDE_BIT|SS_UNFILLED_BIT)
#define TAG(x) x##_twoside_unfilled
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT)
-#define TAG(x) x##_flat_twoside_unfilled
-#include "ss_tritmp.h"
-
#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT)
#define TAG(x) x##_offset_twoside_unfilled
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT)
-#define TAG(x) x##_flat_offset_twoside_unfilled
-#include "ss_tritmp.h"
-
#define IND (0|SS_RGBA_BIT)
#define TAG(x) x##_rgba
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_RGBA_BIT)
-#define TAG(x) x##_flat_rgba
-#include "ss_tritmp.h"
-
#define IND (SS_OFFSET_BIT|SS_RGBA_BIT)
#define TAG(x) x##_offset_rgba
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_OFFSET_BIT|SS_RGBA_BIT)
-#define TAG(x) x##_flat_offset_rgba
-#include "ss_tritmp.h"
-
#define IND (SS_TWOSIDE_BIT|SS_RGBA_BIT)
#define TAG(x) x##_twoside_rgba
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_TWOSIDE_BIT|SS_RGBA_BIT)
-#define TAG(x) x##_flat_twoside_rgba
-#include "ss_tritmp.h"
-
#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_RGBA_BIT)
#define TAG(x) x##_offset_twoside_rgba
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_RGBA_BIT)
-#define TAG(x) x##_flat_offset_twoside_rgba
-#include "ss_tritmp.h"
-
#define IND (SS_UNFILLED_BIT|SS_RGBA_BIT)
#define TAG(x) x##_unfilled_rgba
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
-#define TAG(x) x##_flat_unfilled_rgba
-#include "ss_tritmp.h"
-
#define IND (SS_OFFSET_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
#define TAG(x) x##_offset_unfilled_rgba
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_OFFSET_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
-#define TAG(x) x##_flat_offset_unfilled_rgba
-#include "ss_tritmp.h"
-
#define IND (SS_TWOSIDE_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
#define TAG(x) x##_twoside_unfilled_rgba
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
-#define TAG(x) x##_flat_twoside_unfilled_rgba
-#include "ss_tritmp.h"
-
#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
#define TAG(x) x##_offset_twoside_unfilled_rgba
#include "ss_tritmp.h"
-#define IND (SS_FLAT_BIT|SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT)
-#define TAG(x) x##_flat_offset_twoside_unfilled_rgba
-#include "ss_tritmp.h"
-
void _swsetup_trifuncs_init( GLcontext *ctx )
{
(void) ctx;
init();
- init_flat();
init_offset();
- init_flat_offset();
init_twoside();
- init_flat_twoside();
init_offset_twoside();
- init_flat_offset_twoside();
init_unfilled();
- init_flat_unfilled();
init_offset_unfilled();
- init_flat_offset_unfilled();
init_twoside_unfilled();
- init_flat_twoside_unfilled();
init_offset_twoside_unfilled();
- init_flat_offset_twoside_unfilled();
init_rgba();
- init_flat_rgba();
init_offset_rgba();
- init_flat_offset_rgba();
init_twoside_rgba();
- init_flat_twoside_rgba();
init_offset_twoside_rgba();
- init_flat_offset_twoside_rgba();
init_unfilled_rgba();
- init_flat_unfilled_rgba();
init_offset_unfilled_rgba();
- init_flat_offset_unfilled_rgba();
init_twoside_unfilled_rgba();
- init_flat_twoside_unfilled_rgba();
init_offset_twoside_unfilled_rgba();
- init_flat_offset_twoside_unfilled_rgba();
}
@@ -236,14 +154,19 @@ static void swsetup_points( GLcontext *ctx, GLuint first, GLuint last )
}
}
+static void swsetup_line( GLcontext *ctx, GLuint v0, GLuint v1 )
+{
+ SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
+ _swrast_Line( ctx, &verts[v0], &verts[v1] );
+}
+
+
+
void _swsetup_choose_trifuncs( GLcontext *ctx )
{
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
GLuint ind = 0;
- if (ctx->Light.ShadeModel == GL_FLAT)
- ind |= SS_FLAT_BIT;
-
if (ctx->Polygon._OffsetAny)
ind |= SS_OFFSET_BIT;
@@ -257,8 +180,8 @@ void _swsetup_choose_trifuncs( GLcontext *ctx )
ind |= SS_RGBA_BIT;
swsetup->Triangle = tri_tab[ind];
- swsetup->Line = line_tab[ind];
swsetup->Quad = quad_tab[ind];
+ swsetup->Line = swsetup_line;
swsetup->Points = swsetup_points;
}
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index d04a36b18b5..936774aba4e 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -26,44 +26,20 @@
*/
-static void TAG(triangle)(GLcontext *ctx,
- GLuint e0, GLuint e1, GLuint e2,
- GLuint pv)
+static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
SWvertex *v[3];
- GLfloat offset;
GLfloat z[3];
- GLubyte c[3][4], s[3][4];
- GLuint i[3];
+ GLfloat offset;
GLenum mode = GL_FILL;
+ GLuint facing;
v[0] = &verts[e0];
v[1] = &verts[e1];
v[2] = &verts[e2];
- if (IND & (SS_TWOSIDE_BIT | SS_FLAT_BIT)) {
- if (IND & SS_RGBA_BIT) {
- SS_COLOR(c[0], v[0]->color);
- SS_SPEC(s[0], v[0]->specular);
-
- if (IND & SS_TWOSIDE_BIT) {
- SS_COLOR(c[1], v[1]->color);
- SS_COLOR(c[2], v[2]->color);
-
- SS_SPEC(s[1], v[1]->specular);
- SS_SPEC(s[2], v[2]->specular);
- }
- } else {
- SS_IND(i[0], v[0]->index);
-
- if (IND & SS_TWOSIDE_BIT) {
- SS_IND(i[1], v[1]->index);
- SS_IND(i[2], v[2]->index);
- }
- }
- }
if (IND & (SS_TWOSIDE_BIT | SS_OFFSET_BIT | SS_UNFILLED_BIT))
{
@@ -75,46 +51,24 @@ static void TAG(triangle)(GLcontext *ctx,
if (IND & (SS_TWOSIDE_BIT | SS_UNFILLED_BIT))
{
- GLuint facing = (cc < 0.0) ^ ctx->Polygon._FrontBit;
+ facing = (cc < 0.0) ^ ctx->Polygon._FrontBit;
if (IND & SS_UNFILLED_BIT)
mode = facing ? ctx->Polygon.BackMode : ctx->Polygon.FrontMode;
- if (IND & SS_TWOSIDE_BIT) {
- if (IND & SS_FLAT_BIT) {
+ if (facing == 1) {
+ if (IND & SS_TWOSIDE_BIT) {
if (IND & SS_RGBA_BIT) {
- GLubyte (*vbcolor)[4] = VB->ColorPtr[facing]->data;
- GLubyte (*vbspec)[4] = VB->SecondaryColorPtr[facing]->data;
-
- SS_COLOR(v[0]->color, vbcolor[pv]);
- SS_COLOR(v[1]->color, vbcolor[pv]);
- SS_COLOR(v[2]->color, vbcolor[pv]);
-
- SS_SPEC(v[0]->specular, vbspec[pv]);
- SS_SPEC(v[1]->specular, vbspec[pv]);
- SS_SPEC(v[2]->specular, vbspec[pv]);
- } else {
- GLuint *vbindex = VB->IndexPtr[facing]->data;
-
- SS_IND(v[0]->index, vbindex[pv]);
- SS_IND(v[1]->index, vbindex[pv]);
- SS_IND(v[2]->index, vbindex[pv]);
- }
- } else {
- if (IND & SS_RGBA_BIT) {
- GLubyte (*vbcolor)[4] = VB->ColorPtr[facing]->data;
- GLubyte (*vbspec)[4] = VB->SecondaryColorPtr[facing]->data;
-
+ GLubyte (*vbcolor)[4] = VB->ColorPtr[1]->data;
+ GLubyte (*vbspec)[4] = VB->SecondaryColorPtr[1]->data;
SS_COLOR(v[0]->color, vbcolor[e0]);
SS_COLOR(v[1]->color, vbcolor[e1]);
SS_COLOR(v[2]->color, vbcolor[e2]);
-
SS_SPEC(v[0]->specular, vbspec[e0]);
SS_SPEC(v[1]->specular, vbspec[e1]);
SS_SPEC(v[2]->specular, vbspec[e2]);
} else {
- GLuint *vbindex = VB->IndexPtr[facing]->data;
-
+ GLuint *vbindex = VB->IndexPtr[1]->data;
SS_IND(v[0]->index, vbindex[e0]);
SS_IND(v[1]->index, vbindex[e1]);
SS_IND(v[2]->index, vbindex[e2]);
@@ -143,23 +97,9 @@ static void TAG(triangle)(GLcontext *ctx,
}
}
}
- else if (IND & SS_FLAT_BIT)
- {
- if (IND & SS_RGBA_BIT) {
- GLubyte *color = VB->ColorPtr[0]->data[pv];
- GLubyte *spec = VB->SecondaryColorPtr[0]->data[pv];
-
- SS_COLOR(v[0]->color, color);
- SS_SPEC(v[0]->specular, spec);
- }
- else {
- GLuint index = VB->IndexPtr[0]->data[pv];
- SS_IND(v[0]->index, index);
- }
- }
if (mode == GL_POINT) {
- GLubyte *ef = VB->EdgeFlagPtr->data;
+ GLubyte *ef = VB->EdgeFlag;
if ((IND & SS_OFFSET_BIT) && ctx->Polygon.OffsetPoint) {
v[0]->win[2] += offset;
v[1]->win[2] += offset;
@@ -169,7 +109,7 @@ static void TAG(triangle)(GLcontext *ctx,
if (ef[e1]) _swrast_Point( ctx, v[1] );
if (ef[e2]) _swrast_Point( ctx, v[2] );
} else if (mode == GL_LINE) {
- GLubyte *ef = VB->EdgeFlagPtr->data;
+ GLubyte *ef = VB->EdgeFlag;
if ((IND & SS_OFFSET_BIT) && ctx->Polygon.OffsetLine) {
v[0]->win[2] += offset;
v[1]->win[2] += offset;
@@ -193,27 +133,25 @@ static void TAG(triangle)(GLcontext *ctx,
v[2]->win[2] = z[2];
}
- if (IND & (SS_FLAT_BIT | SS_TWOSIDE_BIT)) {
- if (IND & SS_RGBA_BIT) {
- SS_COLOR(v[0]->color, c[0]);
- SS_SPEC(v[0]->specular, s[0]);
-
- if (IND & SS_TWOSIDE_BIT) {
- SS_COLOR(v[1]->color, c[1]);
- SS_COLOR(v[2]->color, c[2]);
- SS_SPEC(v[1]->specular, s[1]);
- SS_SPEC(v[2]->specular, s[2]);
- }
- }
- else {
- SS_IND(v[0]->index, i[0]);
-
- if (IND & SS_TWOSIDE_BIT) {
- SS_IND(v[1]->index, i[1]);
- SS_IND(v[2]->index, i[2]);
+ if (IND & SS_TWOSIDE_BIT) {
+ if (facing == 1) {
+ if (IND & SS_RGBA_BIT) {
+ GLubyte (*vbcolor)[4] = VB->ColorPtr[0]->data;
+ GLubyte (*vbspec)[4] = VB->SecondaryColorPtr[0]->data;
+ SS_COLOR(v[0]->color, vbcolor[e0]);
+ SS_COLOR(v[1]->color, vbcolor[e1]);
+ SS_COLOR(v[2]->color, vbcolor[e2]);
+ SS_SPEC(v[0]->specular, vbspec[e0]);
+ SS_SPEC(v[1]->specular, vbspec[e1]);
+ SS_SPEC(v[2]->specular, vbspec[e2]);
+ } else {
+ GLuint *vbindex = VB->IndexPtr[0]->data;
+ SS_IND(v[0]->index, vbindex[e0]);
+ SS_IND(v[1]->index, vbindex[e1]);
+ SS_IND(v[2]->index, vbindex[e2]);
}
}
- }
+ }
}
@@ -221,75 +159,31 @@ static void TAG(triangle)(GLcontext *ctx,
/* Need to do something with edgeflags:
*/
static void TAG(quad)( GLcontext *ctx, GLuint v0,
- GLuint v1, GLuint v2, GLuint v3,
- GLuint pv )
+ GLuint v1, GLuint v2, GLuint v3 )
{
if (IND & SS_UNFILLED_BIT) {
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- GLubyte ef1 = VB->EdgeFlagPtr->data[v1];
- GLubyte ef3 = VB->EdgeFlagPtr->data[v3];
- VB->EdgeFlagPtr->data[v1] = 0;
- TAG(triangle)( ctx, v0, v1, v3, pv );
- VB->EdgeFlagPtr->data[v1] = ef1;
- VB->EdgeFlagPtr->data[v3] = 0;
- TAG(triangle)( ctx, v1, v2, v3, pv );
- VB->EdgeFlagPtr->data[v3] = ef3;
+ GLubyte ef1 = VB->EdgeFlag[v1];
+ GLubyte ef3 = VB->EdgeFlag[v3];
+ VB->EdgeFlag[v1] = 0;
+ TAG(triangle)( ctx, v0, v1, v3 );
+ VB->EdgeFlag[v1] = ef1;
+ VB->EdgeFlag[v3] = 0;
+ TAG(triangle)( ctx, v1, v2, v3 );
+ VB->EdgeFlag[v3] = ef3;
} else {
- TAG(triangle)( ctx, v0, v1, v3, pv );
- TAG(triangle)( ctx, v1, v2, v3, pv );
+ TAG(triangle)( ctx, v0, v1, v3 );
+ TAG(triangle)( ctx, v1, v2, v3 );
}
}
-static void TAG(line)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv )
-{
- struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
- GLubyte c[2][4], s[2][4];
- GLuint i[2];
- SWvertex *vert0 = &verts[v0];
- SWvertex *vert1 = &verts[v1];
-
-
- if (IND & SS_FLAT_BIT) {
- if (IND & SS_RGBA_BIT) {
- GLubyte *color = VB->ColorPtr[0]->data[pv];
- GLubyte *spec = VB->SecondaryColorPtr[0]->data[pv];
-
- SS_COLOR(c[0], vert0->color);
- SS_COLOR(vert0->color, color);
-
- SS_SPEC(s[0], vert0->specular);
- SS_SPEC(vert0->specular, spec);
- }
- else {
- GLuint index = VB->IndexPtr[0]->data[pv];
-
- SS_IND(i[0], vert0->index);
- SS_IND(vert0->index, index);
- }
- }
-
- _swrast_Line( ctx, vert0, vert1 );
-
- if (IND & SS_FLAT_BIT) {
- if (IND & SS_RGBA_BIT) {
- SS_COLOR(vert0->color, c[0]);
- SS_SPEC(vert0->specular, s[0]);
- }
- else {
- SS_IND(vert0->index, i[0]);
- }
- }
-}
-
static void TAG(init)( void )
{
tri_tab[IND] = TAG(triangle);
quad_tab[IND] = TAG(quad);
- line_tab[IND] = TAG(line);
}
diff --git a/src/mesa/swrast_setup/swrast_setup.h b/src/mesa/swrast_setup/swrast_setup.h
index e5ea9668219..fd9c94d4e5b 100644
--- a/src/mesa/swrast_setup/swrast_setup.h
+++ b/src/mesa/swrast_setup/swrast_setup.h
@@ -47,23 +47,16 @@ _swsetup_BuildProjectedVertices( GLcontext *ctx,
GLuint new_inputs );
extern void
-_swsetup_Quad( GLcontext *ctx, GLuint v0, GLuint v1,
- GLuint v2, GLuint v3, GLuint pv );
+_swsetup_Quad( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3 );
extern void
-_swsetup_Triangle( GLcontext *ctx, GLuint v0, GLuint v1,
- GLuint v2, GLuint pv );
-
+_swsetup_Triangle( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2 );
extern void
-_swsetup_Line( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv );
-
+_swsetup_Line( GLcontext *ctx, GLuint v0, GLuint v1 );
extern void
_swsetup_Points( GLcontext *ctx, GLuint first, GLuint last );
-extern void
-_swsetup_IndexedPoints( GLcontext *ctx, GLuint first, GLuint last );
-
#endif