gl_shader_decompiler: Implement SEL instruction.

This commit is contained in:
bunnei 2018-07-22 00:37:12 -04:00
parent 4cd5df95d6
commit c43eaa94f3
2 changed files with 20 additions and 0 deletions

View file

@ -1139,6 +1139,15 @@ private:
"((" + op_a + " << " + shift + ") + " + op_b + ')', 1, 1);
break;
}
case OpCode::Id::SEL_C:
case OpCode::Id::SEL_R:
case OpCode::Id::SEL_IMM: {
std::string condition =
GetPredicateCondition(instr.sel.pred, instr.sel.neg_pred != 0);
regs.SetRegisterToInteger(instr.gpr0, true, 0,
'(' + condition + ") ? " + op_a + " : " + op_b, 1, 1);
break;
}
case OpCode::Id::LOP_C:
case OpCode::Id::LOP_R:
case OpCode::Id::LOP_IMM: {