aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-06-09 18:01:03 +1000
committerBen Skeggs <[email protected]>2008-06-29 15:46:16 +1000
commit21e688e0a3faeef18b07c4d860bd71cc6e3ddf4a (patch)
tree435a61b7afea55844a25f80481639ee0b5c5885c /src/gallium
parent454394e749feca5ac00e7a270e6ca5529581d228 (diff)
nv50: LRP
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index 843e0362514..33822a1a788 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -85,7 +85,7 @@ struct nv50_pc {
float *immd_buf;
int immd_nr;
- struct nv50_reg *temp_temp[8];
+ struct nv50_reg *temp_temp[16];
unsigned temp_temp_nr;
};
@@ -154,7 +154,7 @@ free_temp(struct nv50_pc *pc, struct nv50_reg *r)
static struct nv50_reg *
temp_temp(struct nv50_pc *pc)
{
- if (pc->temp_temp_nr >= 8)
+ if (pc->temp_temp_nr >= 16)
assert(0);
pc->temp_temp[pc->temp_temp_nr] = alloc_temp(pc, NULL);
@@ -966,6 +966,18 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok)
emit_flop(pc, 3, dst[c], src[0][c]);
}
break;
+ case TGSI_OPCODE_LRP:
+ 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);
+ }
+ break;
case TGSI_OPCODE_MAD:
for (c = 0; c < 4; c++) {
if (!(mask & (1 << c)))