Mesa (gallium-0.1): mesa: use _bfc0 instead of _col0 when building back face lighting.

Brian Paul brianp at kemper.freedesktop.org
Fri Nov 7 17:24:49 UTC 2008


Module: Mesa
Branch: gallium-0.1
Commit: eb459814b7e7adc8b5f0062128f4ea4ff68b07cf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb459814b7e7adc8b5f0062128f4ea4ff68b07cf

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Fri Nov  7 10:23:22 2008 -0700

mesa: use _bfc0 instead of _col0 when building back face lighting.

cherry-picked from master: 4550b0562d5b59890fccb0e7eb0dbef967d1ccf9

---

 src/mesa/main/ffvertex_prog.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index dff4306..9ac8328 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -1308,14 +1308,13 @@ static void build_lighting( struct tnl_program *p )
             }
             else if (!p->state->material_shininess_is_zero) {
                emit_op1(p, OPCODE_LIT, lit, 0, dots);
-               emit_op2(p, OPCODE_ADD, _col0, 0, ambient, _col0);
+               emit_op2(p, OPCODE_ADD, _bfc0, 0, ambient, _bfc0);
             } 
             else {
                emit_degenerate_lit(p, lit, dots);
-               emit_op2(p, OPCODE_ADD, _col0, 0, ambient, _col0);
+               emit_op2(p, OPCODE_ADD, _bfc0, 0, ambient, _bfc0);
             }
 
-	    emit_op2(p, OPCODE_ADD, _bfc0, 0, ambient, _bfc0);
 	    emit_op3(p, OPCODE_MAD, res0, mask0, swizzle1(lit,Y), diffuse, _bfc0);
 	    emit_op3(p, OPCODE_MAD, res1, mask1, swizzle1(lit,Z), specular, _bfc1);
 




More information about the mesa-commit mailing list