Module: Mesa Branch: master Commit: b424bf69dfd78c64e065b8ba59d9b40a8f4fecd6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b424bf69dfd78c64e065b8ba59d9b40a8f4fecd6
Author: Christoph Bumiller <e0425...@student.tuwien.ac.at> Date: Wed Jan 11 20:25:06 2012 +0100 nv50/ir: handle TGSI_OPCODE_ISSG --- .../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 7f4c7f2..a1c8f84 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: _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit