From 5cfb0a4087352c22a13ca55a98ae3e2e420d4b52 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Tue, 11 Nov 2008 13:36:32 +0800 Subject: mesa: restore the negate flag of dots in build_lighting. Dots is re-used if more than one light is enabled. Previously the negate flag of dots may affect next light. --- src/mesa/main/ffvertex_prog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index 9ac8328ef0..b87c443fec 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -1318,6 +1318,9 @@ static void build_lighting( struct tnl_program *p ) emit_op3(p, OPCODE_MAD, res0, mask0, swizzle1(lit,Y), diffuse, _bfc0); emit_op3(p, OPCODE_MAD, res1, mask1, swizzle1(lit,Z), specular, _bfc1); + /* restore negate flag for next lighting */ + dots = negate(dots); + release_temp(p, ambient); release_temp(p, diffuse); release_temp(p, specular); -- cgit v1.2.3