summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast_setup/ss_triangle.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-26 10:13:02 -0600
committerBrian <[email protected]>2007-03-26 10:13:02 -0600
commitd619cceea47dc3070ebb7f7ea4f8b6b31a672d38 (patch)
treef8b8a9f3fdc3f17a43436af270b22754b1749d31 /src/mesa/swrast_setup/ss_triangle.c
parent76f3b66e0489526694d6a39b4a6ac3b1c2bee100 (diff)
parente71c34aaa173ca451fa02e526ead77758f7eeb74 (diff)
merge of glsl-compiler-1 branch
Diffstat (limited to 'src/mesa/swrast_setup/ss_triangle.c')
-rw-r--r--src/mesa/swrast_setup/ss_triangle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c
index 09244d9c4bc..628e9288e87 100644
--- a/src/mesa/swrast_setup/ss_triangle.c
+++ b/src/mesa/swrast_setup/ss_triangle.c
@@ -290,8 +290,10 @@ 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->VertexProgram._Enabled && ctx->VertexProgram.TwoSideEnabled) ||
+ (ctx->FragmentProgram._Current && ctx->FragmentProgram._Current->Base.InputsRead & (1 << FRAG_ATTRIB_FOGC)))
ind |= SS_TWOSIDE_BIT;
/* We piggyback the two-sided stencil front/back determination on the