On 09/29/2011 08:23 PM, Eric Anholt wrote:
On Thu, 29 Sep 2011 14:24:48 -0600, Brian Paul<brian.e.p...@gmail.com>  wrote:
From: Brian Paul<bri...@vmware.com>

If color material mode is enabled, constant buffer entries related
to the lighting coefficients will depend on glColor.  So add
_NEW_CURRENT_ATTRIB to the bitset returned for lighting-related
constants in _mesa_program_state_flags().

This fixes a bug exercised by the new piglit draw-arrays-colormaterial
test.
---
  src/mesa/program/prog_statevars.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/program/prog_statevars.c 
b/src/mesa/program/prog_statevars.c
index 6aa2409..9c3d30c 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -668,7 +668,7 @@ _mesa_program_state_flags(const gl_state_index 
state[STATE_LENGTH])
     case STATE_LIGHTMODEL_AMBIENT:
     case STATE_LIGHTMODEL_SCENECOLOR:
     case STATE_LIGHTPROD:
-      return _NEW_LIGHT;
+      return _NEW_LIGHT | _NEW_CURRENT_ATTRIB;

     case STATE_TEXGEN:
        return _NEW_TEXTURE;

Not that we care a whole ton about fixed function lighting performance,
but I don't think this flag applies to STATE_LIGHT (the others are all
true, though).

Yeah, the STATE_LIGHTMODEL_x cases aren't significant either. I can re-spin this one too...

-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to