diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-06-07 13:01:58 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-06-29 15:46:15 +1000 |
commit | 68091b0c89310c309b668c9d6d80640dc6040ab7 (patch) | |
tree | 5646132aa6bfc2496d4d7c1da81e72f3b72a6c40 /src | |
parent | b4f7463585071236d633e4c857dbbdf67b03dc94 (diff) |
nv50: ABS
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_program.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index 448062e767..7c2177d42d 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -12,8 +12,7 @@ #define NV50_SU_MAX_TEMP 64 -/* ABS - * ARL +/* ARL * DST - const(1.0) * LIT * POW @@ -670,6 +669,21 @@ nv50_program_tx_insn(struct nv50_pc *pc, const union tgsi_full_token *tok) } switch (inst->Instruction.Opcode) { + case TGSI_OPCODE_ABS: + for (c = 0; c < 4; c++) { + unsigned inst[2] = { 0, 0 }; + + set_long(pc, inst); + inst[0] = 0xa0000000; /* cvt */ + inst[1] |= (6 << 29); /* cvt */ + inst[1] |= 0x04000000; /* 32 bit */ + inst[1] |= (1 << 14); /* src .f32 */ + inst[1] |= ((1 << 6) << 14); /* .abs */ + set_dst(pc, dst[c], inst); + set_src_0(pc, src[0][c], inst); + emit(pc, inst); + } + break; case TGSI_OPCODE_ADD: for (c = 0; c < 4; c++) { if (!(mask & (1 << c))) |