diff options
author | Christoph Bumiller <[email protected]> | 2009-05-23 12:21:54 +0200 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2009-05-28 16:06:17 +1000 |
commit | 229992d2812581ffae24d69a5a983d2c8441f720 (patch) | |
tree | cb1577891211c1f9e0e63fd331a32af4976ef174 /src | |
parent | 9417582f39788476e1039df3f1bdf681686fb7b4 (diff) |
nv50: make LRP instruction nicer
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_program.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index a33ec5997a3..6aec9cc8414 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -1117,15 +1117,12 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok) } break; case TGSI_OPCODE_LRP: + temp = temp_temp(pc); for (c = 0; c < 4; c++) { if (!(mask & (1 << c))) continue; - /*XXX: we can do better than this */ - temp = alloc_temp(pc, NULL); - emit_neg(pc, temp, src[0][c]); - emit_mad(pc, temp, temp, src[2][c], src[2][c]); - emit_mad(pc, dst[c], src[0][c], src[1][c], temp); - free_temp(pc, temp); + emit_sub(pc, temp, src[1][c], src[2][c]); + emit_mad(pc, dst[c], temp, src[0][c], src[2][c]); } break; case TGSI_OPCODE_MAD: |