summaryrefslogtreecommitdiff
path: root/src/mesa/swrast_setup/ss_triangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast_setup/ss_triangle.c')
-rw-r--r--src/mesa/swrast_setup/ss_triangle.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c
index 9fef7a52ec..54e24c4c44 100644
--- a/src/mesa/swrast_setup/ss_triangle.c
+++ b/src/mesa/swrast_setup/ss_triangle.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 7.1
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 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"),
@@ -68,6 +68,8 @@ static void _swsetup_render_line_tri( GLcontext *ctx,
return;
}
+ _swrast_SetFacing(ctx, facing);
+
if (ctx->Light.ShadeModel == GL_FLAT) {
COPY_CHAN4(c[0], v0->color);
COPY_CHAN4(c[1], v1->color);
@@ -127,6 +129,8 @@ static void _swsetup_render_point_tri( GLcontext *ctx,
return;
}
+ _swrast_SetFacing(ctx, facing);
+
if (ctx->Light.ShadeModel == GL_FLAT) {
/* save colors/indexes for v0, v1 vertices */
COPY_CHAN4(c[0], v0->color);
@@ -290,10 +294,8 @@ void _swsetup_choose_trifuncs( GLcontext *ctx )
ctx->Polygon.OffsetFill)
ind |= SS_OFFSET_BIT;
- /* Note: gl_FrontFacing lives in fragment input FOGC.Y at this time */
if ((ctx->Light.Enabled && ctx->Light.Model.TwoSide) ||
- (ctx->VertexProgram._Enabled && ctx->VertexProgram.TwoSideEnabled) ||
- (ctx->FragmentProgram._Current && ctx->FragmentProgram._Current->Base.InputsRead & (1 << FRAG_ATTRIB_FOGC)))
+ (ctx->VertexProgram._Current && ctx->VertexProgram.TwoSideEnabled))
ind |= SS_TWOSIDE_BIT;
/* We piggyback the two-sided stencil front/back determination on the
@@ -311,6 +313,4 @@ void _swsetup_choose_trifuncs( GLcontext *ctx )
tnl->Driver.Render.Quad = quad_tab[ind];
tnl->Driver.Render.Line = swsetup_line;
tnl->Driver.Render.Points = swsetup_points;
-
- ctx->_Facing = 0;
}