Mesa (master): mesa: restore the negate flag of dots in build_lighting.

Haihao Xiang haihao at kemper.freedesktop.org
Tue Nov 11 06:02:44 UTC 2008


Module: Mesa
Branch: master
Commit: 8412b06b67d0f9adae18157f550a8cc3da5ae22b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8412b06b67d0f9adae18157f550a8cc3da5ae22b

Author: Xiang, Haihao <haihao.xiang at intel.com>
Date:   Tue Nov 11 13:36:32 2008 +0800

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 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 0d13464..ebc0294 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -1311,6 +1311,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);




More information about the mesa-commit mailing list