summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBenno Schulenberg <bensberg@justemail.net>2007-11-08 07:34:20 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-11-08 07:34:55 -0700
commit1dfec88e72c92647b779286bbc8e6ee313d6f1f6 (patch)
treed0942d5f970cd5b0d65389a57b7219ea1dc94738 /src/mesa/drivers
parent286ce2719395485ffafb38097fa2551b066acd96 (diff)
fix Unichrome/Blender crash, bug 13142
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c
index 4cc7942b1b..73e6626071 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.c
+++ b/src/mesa/drivers/dri/unichrome/via_tris.c
@@ -666,9 +666,11 @@ static void viaChooseRenderState(GLcontext *ctx)
}
if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) {
- if (flags & DD_TRI_LIGHT_TWOSIDE) index |= VIA_TWOSIDE_BIT;
+ if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
+ index |= VIA_TWOSIDE_BIT;
if (flags & DD_TRI_OFFSET) index |= VIA_OFFSET_BIT;
- if (flags & DD_TRI_UNFILLED) index |= VIA_UNFILLED_BIT;
+ if (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL)
+ index |= VIA_UNFILLED_BIT;
if (flags & ANY_FALLBACK_FLAGS) index |= VIA_FALLBACK_BIT;
/* Hook in fallbacks for specific primitives.