summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2007-08-31 16:50:48 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2007-08-31 16:50:48 +0800
commit214347fdb4c30dc8bac5d4b9a823458709bc53ea (patch)
tree2eb2d4d146e330e5dd02204b9bff43ba70d6b19d /src/mesa/drivers
parentb47c9f8c915ae4ca8c7fa5ee3b6b64f17c38b569 (diff)
i965: Calculate the positional light in homogeneous coordinates.
fix bug#11009
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_tnl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c
index b69be350a9..339a330448 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c
@@ -1003,6 +1003,11 @@ static void build_lighting( struct tnl_program *p )
VPpli = get_temp(p);
half = get_temp(p);
+
+ /* In homogeneous object coordinates
+ */
+ emit_op1(p, OPCODE_RCP, dist, 0, swizzle1(Ppli, W));
+ emit_op2(p, OPCODE_MUL, Ppli, 0, Ppli, dist);
/* Calulate VPpli vector
*/