shader_ir: Implement BRX & BRA.CC

This commit is contained in:
Fernando Sahmkow 2019-06-24 21:25:38 -04:00 committed by FernandoS27
parent c218ae4b02
commit 8a6fc529a9
6 changed files with 76 additions and 4 deletions

View file

@ -1555,6 +1555,14 @@ private:
return {};
}
std::string BranchIndirect(Operation operation) {
const std::string op_a = VisitOperand(operation, 0, Type::Uint);
code.AddLine("jmp_to = {};", op_a);
code.AddLine("break;");
return {};
}
std::string PushFlowStack(Operation operation) {
const auto stack = std::get<MetaStackClass>(operation.GetMeta());
const auto target = std::get_if<ImmediateNode>(&*operation[0]);
@ -1789,6 +1797,7 @@ private:
&GLSLDecompiler::ImageStore,
&GLSLDecompiler::Branch,
&GLSLDecompiler::BranchIndirect,
&GLSLDecompiler::PushFlowStack,
&GLSLDecompiler::PopFlowStack,
&GLSLDecompiler::Exit,