i965: Calculate the positional light in homogeneous coordinates.

fix bug#11009
This commit is contained in:
Xiang, Haihao 2007-08-31 16:50:48 +08:00
parent b47c9f8c91
commit 214347fdb4
2 changed files with 10 additions and 0 deletions

View file

@ -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
*/

View file

@ -960,6 +960,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
*/
emit_op2(p, OPCODE_SUB, VPpli, 0, Ppli, V);