Mesa (master): mesa: Fix detection of whether an ARB_vp is enabled for two sided lighting.

Eric Anholt anholt at kemper.freedesktop.org
Thu Oct 20 09:00:34 PDT 2011


Module: Mesa
Branch: master
Commit: c0cd9471173cd2287d74f5a536577348c789da5d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c0cd9471173cd2287d74f5a536577348c789da5d

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Oct 18 15:20:27 2011 -0700

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 <brianp at vmware.com>

---

 src/mesa/main/state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 98ca733..80fd03b 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 &&



More information about the mesa-commit mailing list