summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-09-30 08:15:30 -0600
committerBrian Paul <[email protected]>2011-09-30 08:16:21 -0600
commit57169c469406f1880107a6b9f052708ce078942d (patch)
treebd62cb65ae79ffe79b09c09832ad90d7202b1d69 /src/mesa
parent4e6bb0774ffa93141a3a8ec7bb47b190810b2a4b (diff)
mesa: add _NEW_CURRENT_ATTRIB in _mesa_program_state_flags()
If color material mode is enabled, constant buffer entries related to the material coefficients will depend on glColor. So add _NEW_CURRENT_ATTRIB to the bitset returned for material-related constants in _mesa_program_state_flags(). This fixes a bug exercised by the new piglit draw-arrays-colormaterial test. Note: This is a candidate for the 7.11 branch.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/program/prog_statevars.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c
index 6aa2409e85e..f34a6d3609d 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -664,10 +664,13 @@ _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH])
{
switch (state[0]) {
case STATE_MATERIAL:
+ case STATE_LIGHTPROD:
+ case STATE_LIGHTMODEL_SCENECOLOR:
+ /* these can be effected by glColor when colormaterial mode is used */
+ return _NEW_LIGHT | _NEW_CURRENT_ATTRIB;
+
case STATE_LIGHT:
case STATE_LIGHTMODEL_AMBIENT:
- case STATE_LIGHTMODEL_SCENECOLOR:
- case STATE_LIGHTPROD:
return _NEW_LIGHT;
case STATE_TEXGEN: