diff options
author | Nian Wu <nian.wu@intel.com> | 2007-03-14 17:00:15 +0800 |
---|---|---|
committer | Nian Wu <nian.wu@intel.com> | 2007-03-14 17:00:15 +0800 |
commit | 805b1cf4821aa807ce0f87d03dc464c0ee01a33a (patch) | |
tree | 5aac096ed7372f84b1afa37cebd72768fe010632 /src/mesa/tnl/t_vp_build.c | |
parent | 4110fac38958003935f64e278d3a7b880523efe2 (diff) | |
parent | a6cc9ab493a2efa9a0ea91cddba0e85c8c8c83f1 (diff) |
Merge git://proxy01.pd.intel.com:9419/git/mesa/mesa into crestline
Diffstat (limited to 'src/mesa/tnl/t_vp_build.c')
-rw-r--r-- | src/mesa/tnl/t_vp_build.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 2a97a1c8c7..2663d99304 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -1329,14 +1329,16 @@ static void build_pointsize( struct tnl_program *p ) struct ureg out = register_output(p, VERT_RESULT_PSIZ); struct ureg ut = get_temp(p); + /* dist = |eyez| */ + emit_op1(p, OPCODE_ABS, ut, WRITEMASK_Y, swizzle1(eye, Z)); /* p1 + dist * (p2 + dist * p3); */ - emit_op3(p, OPCODE_MAD, ut, 0, negate(swizzle1(eye, Z)), + emit_op3(p, OPCODE_MAD, ut, WRITEMASK_X, swizzle1(ut, Y), swizzle1(state_attenuation, Z), swizzle1(state_attenuation, Y)); - emit_op3(p, OPCODE_MAD, ut, 0, negate(swizzle1(eye, Z)), + emit_op3(p, OPCODE_MAD, ut, WRITEMASK_X, swizzle1(ut, Y), ut, swizzle1(state_attenuation, X)); /* 1 / sqrt(factor) */ - emit_op1(p, OPCODE_RSQ, ut, 0, ut ); + emit_op1(p, OPCODE_RSQ, ut, WRITEMASK_X, ut ); #if 1 /* out = pointSize / sqrt(factor) */ @@ -1344,8 +1346,8 @@ static void build_pointsize( struct tnl_program *p ) #else /* not sure, might make sense to do clamping here, but it's not done in t_vb_points neither */ - emit_op2(p, OPCODE_MUL, ut, 0, ut, state_size); - emit_op2(p, OPCODE_MAX, ut, 0, ut, swizzle1(state_size, Y)); + emit_op2(p, OPCODE_MUL, ut, WRITEMASK_X, ut, state_size); + emit_op2(p, OPCODE_MAX, ut, WRITEMASK_X, ut, swizzle1(state_size, Y)); emit_op2(p, OPCODE_MIN, out, WRITEMASK_X, ut, swizzle1(state_size, Z)); #endif |