summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2007-09-01 15:43:15 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2007-09-01 15:43:15 +0800
commitcb7da3f09655f9c66eabb6a38f581c9176980cd2 (patch)
tree7edb295f3ee844ebf36791373dbd227630f597e8 /src/mesa/drivers/dri/i965
parent6dd98e9853a6984150aa47467112e016c40a4ab4 (diff)
i965: Correct build_lighting in i965 driver according to
commit 6dd98e9853a6984150aa47467112e016c40a4ab4.
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_tnl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c
index 339a330448..2ed80dc36e 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c
@@ -1000,6 +1000,7 @@ static void build_lighting( struct tnl_program *p )
STATE_POSITION);
struct ureg V = get_eye_position(p);
struct ureg dist = get_temp(p);
+ struct ureg tmpPpli = get_temp(p);
VPpli = get_temp(p);
half = get_temp(p);
@@ -1007,11 +1008,11 @@ static void build_lighting( struct tnl_program *p )
/* In homogeneous object coordinates
*/
emit_op1(p, OPCODE_RCP, dist, 0, swizzle1(Ppli, W));
- emit_op2(p, OPCODE_MUL, Ppli, 0, Ppli, dist);
+ emit_op2(p, OPCODE_MUL, tmpPpli, 0, Ppli, dist);
/* Calulate VPpli vector
*/
- emit_op2(p, OPCODE_SUB, VPpli, 0, Ppli, V);
+ emit_op2(p, OPCODE_SUB, VPpli, 0, tmpPpli, V);
/* Normalize VPpli. The dist value also used in
* attenuation below.
@@ -1043,6 +1044,7 @@ static void build_lighting( struct tnl_program *p )
emit_normalize_vec3(p, half, half);
release_temp(p, dist);
+ release_temp(p, tmpPpli);
}
/* Calculate dot products: