summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-10-18 15:20:27 -0700
committerEric Anholt <[email protected]>2011-10-20 08:45:20 -0700
commitc0cd9471173cd2287d74f5a536577348c789da5d (patch)
treec2e4d553a71b298fc6c34694b31494db2f3bcba5 /src/mesa/main/state.c
parentf80e1e7d1de80fd919f376368d1cfc9416dabdc3 (diff)
mesa: Fix detection of whether an ARB_vp is enabled for two sided lighting.
When there is no ARB_vertex_program program enabled, the Current pointer points at a default program, so we were always using VERTEX_PROGRAM_TWO_SIDE, even for fixed function lighting. Fixes piglit two-sided-lighting* Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 98ca733c0b9..80fd03b919d 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -461,7 +461,7 @@ static void
update_twoside(struct gl_context *ctx)
{
if (ctx->Shader.CurrentVertexProgram ||
- ctx->VertexProgram.Current) {
+ ctx->VertexProgram._Enabled) {
ctx->VertexProgram._TwoSideEnabled = ctx->VertexProgram.TwoSideEnabled;
} else {
ctx->VertexProgram._TwoSideEnabled = (ctx->Light.Enabled &&