summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_imm_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl/t_imm_exec.c')
-rw-r--r--src/mesa/tnl/t_imm_exec.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c
index 38108785a1..f1d6ee8925 100644
--- a/src/mesa/tnl/t_imm_exec.c
+++ b/src/mesa/tnl/t_imm_exec.c
@@ -154,9 +154,11 @@ void _tnl_copy_to_current( GLcontext *ctx, struct immediate *IM,
}
if (flag & VERT_BIT_MATERIAL) {
- _mesa_update_material( ctx,
- IM->Material[IM->LastMaterial],
- IM->MaterialOrMask );
+ _mesa_copy_materials( &ctx->Light.Material,
+ &IM->Material[IM->LastMaterial],
+ IM->MaterialOrMask );
+
+ _mesa_update_material( ctx, IM->MaterialOrMask );
TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange( ctx );
}