diff options
author | Keith Whitwell <[email protected]> | 2008-05-24 16:32:08 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-05-24 16:32:08 +0100 |
commit | 48a24f0ff7e3aad000b8acc55c16bbeaca58abe6 (patch) | |
tree | 347862455e140e8747697f9b3d151bc0b7a4d297 /src/mesa/main | |
parent | 86e529ad90411d21bca3d70984b2db202e7a0cd6 (diff) |
Revert "mesa: save a temp on normalizes"
This reverts commit feceb43948f76cc4d4c8ecbb86b1b1f438c6daee.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/ffvertex_prog.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index 7a099b23767..a627a21f650 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -305,7 +305,7 @@ static struct state_key *make_state_key( GLcontext *ctx ) * generated program with line/function references for each * instruction back into this file: */ -#define DISASSEM 1 +#define DISASSEM (MESA_VERBOSE&VERBOSE_DISASSEM) /* Should be tunable by the driver - do we want to do matrix * multiplications with DP4's or with MUL/MAD's? SSE works better @@ -687,9 +687,11 @@ static void emit_normalize_vec3( struct tnl_program *p, struct ureg dest, struct ureg src ) { - emit_op2(p, OPCODE_DP3, dest, WRITEMASK_X, src, src); - emit_op1(p, OPCODE_RSQ, dest, WRITEMASK_X, dest); - emit_op2(p, OPCODE_MUL, dest, 0, src, swizzle1(dest, X)); + struct ureg tmp = get_temp(p); + emit_op2(p, OPCODE_DP3, tmp, WRITEMASK_X, src, src); + emit_op1(p, OPCODE_RSQ, tmp, WRITEMASK_X, tmp); + emit_op2(p, OPCODE_MUL, dest, 0, src, swizzle1(tmp, X)); + release_temp(p, tmp); } static void emit_passthrough( struct tnl_program *p, |