diff options
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r-- | src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp | 5 | ||||
-rw-r--r-- | src/gallium/drivers/nv50/codegen/nv50_ir_lowering_nv50.cpp | 2 |
2 files changed, 5 insertions, 2 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 68976914240..d8abccd15af 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp @@ -242,6 +242,7 @@ unsigned int Instruction::srcMask(unsigned int s) const case TGSI_OPCODE_SCS: return 0x1; case TGSI_OPCODE_IF: + case TGSI_OPCODE_UIF: return 0x1; case TGSI_OPCODE_LIT: return 0xb; @@ -385,6 +386,7 @@ static nv50_ir::TexTarget translateTexture(uint tex) nv50_ir::DataType Instruction::inferSrcType() const { switch (getOpcode()) { + case TGSI_OPCODE_UIF: case TGSI_OPCODE_AND: case TGSI_OPCODE_OR: case TGSI_OPCODE_XOR: @@ -2430,6 +2432,7 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) mkOp1(op, TYPE_U32, NULL, src0)->fixed = 1; break; case TGSI_OPCODE_IF: + case TGSI_OPCODE_UIF: { BasicBlock *ifBB = new BasicBlock(func); @@ -2437,7 +2440,7 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) condBBs.push(bb); joinBBs.push(bb); - mkFlow(OP_BRA, NULL, CC_NOT_P, fetchSrc(0, 0)); + mkFlow(OP_BRA, NULL, CC_NOT_P, fetchSrc(0, 0))->setType(srcTy); setPosition(ifBB, true); } diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_lowering_nv50.cpp index 20f76f81ded..03086e379c0 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_lowering_nv50.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_lowering_nv50.cpp @@ -1011,7 +1011,7 @@ NV50LoweringPreSSA::checkPredicate(Instruction *insn) return; cdst = bld.getSSA(1, FILE_FLAGS); - bld.mkCmp(OP_SET, CC_NEU, TYPE_U32, cdst, bld.loadImm(NULL, 0), pred); + bld.mkCmp(OP_SET, CC_NEU, insn->dType, cdst, bld.loadImm(NULL, 0), pred); insn->setPredicate(insn->cc, cdst); } |