diff options
author | Nian Wu <nian.wu@intel.com> | 2007-03-12 09:03:27 +0800 |
---|---|---|
committer | Nian Wu <nian.wu@intel.com> | 2007-03-12 09:03:27 +0800 |
commit | 5a5b55943dfdb7fac77f7556058791302ee8639b (patch) | |
tree | 7bcaea81b25884b6e6516d1df47f671247964276 /src/mesa/drivers/dri/i965 | |
parent | 1e055089a37bca8bc5e1cec37d5559fcdb0cf21f (diff) | |
parent | 61ec23cc63a040a2edf1bc466917e85362514c89 (diff) |
Merge git://proxy01.pd.intel.com:9419/git/mesa/mesa into crestline
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_tnl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_tnl.c b/src/mesa/drivers/dri/i965/brw_vs_tnl.c index 0d61092247..c05a9b5ea1 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_tnl.c +++ b/src/mesa/drivers/dri/i965/brw_vs_tnl.c @@ -988,7 +988,14 @@ static void build_lighting( struct tnl_program *p ) */ VPpli = register_param3(p, STATE_LIGHT, i, STATE_POSITION_NORMALIZED); - half = register_param3(p, STATE_LIGHT, i, STATE_HALF); + if (p->state->light_local_viewer) { + struct ureg eye_hat = get_eye_position_normalized(p); + half = get_temp(p); + emit_op2(p, OPCODE_SUB, half, 0, VPpli, eye_hat); + emit_normalize_vec3(p, half, half); + } else { + half = register_param3(p, STATE_LIGHT, i, STATE_HALF); + } } else { struct ureg Ppli = register_param3(p, STATE_LIGHT, i, |