diff options
Diffstat (limited to 'src/mesa/tnl/t_vb_light.c')
| -rw-r--r-- | src/mesa/tnl/t_vb_light.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index 1a89bf3..7d19c15 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -118,12 +118,11 @@ static GLuint prepare_materials( GLcontext *ctx, store->mat_bitmask |= (1<<attr); } } - - /* FIXME: Is this already done? - */ - _mesa_update_material( ctx, ~0 ); - _mesa_validate_all_lighting_tables( ctx ); + if (store->mat_count) { + _mesa_update_material( ctx, ~0 ); + _mesa_validate_all_lighting_tables( ctx ); + } return store->mat_count; } |
