diff options
author | Christoph Bumiller <[email protected]> | 2012-01-11 20:25:06 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-01-11 20:26:58 +0100 |
commit | b424bf69dfd78c64e065b8ba59d9b40a8f4fecd6 (patch) | |
tree | e1c09848e9a420f0d719aa286d25b5d6d0581515 /src/gallium/drivers/nv50/codegen | |
parent | 9d503992d7309a49df0b0a4887b999e2d6b291c0 (diff) |
nv50/ir: handle TGSI_OPCODE_ISSG
Diffstat (limited to 'src/gallium/drivers/nv50/codegen')
-rw-r--r-- | src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp index 7f4c7f261ef..a1c8f84d7ed 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp @@ -385,6 +385,7 @@ nv50_ir::DataType Instruction::inferSrcType() const case TGSI_OPCODE_ISGE: case TGSI_OPCODE_ISHR: case TGSI_OPCODE_ISLT: + case TGSI_OPCODE_ISSG: case TGSI_OPCODE_SAD: // not sure about SAD, but no one has a float version case TGSI_OPCODE_MOD: case TGSI_OPCODE_UARL: @@ -1892,14 +1893,18 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) } } break; + case TGSI_OPCODE_ISSG: case TGSI_OPCODE_SSG: FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi) { src0 = fetchSrc(0, c); val0 = getScratch(); val1 = getScratch(); - mkCmp(OP_SET, CC_GT, TYPE_F32, val0, src0, zero); - mkCmp(OP_SET, CC_LT, TYPE_F32, val1, src0, zero); - mkOp2(OP_SUB, TYPE_F32, dst0[c], val0, val1); + mkCmp(OP_SET, CC_GT, srcTy, val0, src0, zero); + mkCmp(OP_SET, CC_LT, srcTy, val1, src0, zero); + if (srcTy == TYPE_F32) + mkOp2(OP_SUB, TYPE_F32, dst0[c], val0, val1); + else + mkOp2(OP_SUB, TYPE_S32, dst0[c], val1, val0); } break; case TGSI_OPCODE_UCMP: |