shader_ir: Implement BRX & BRA.CC
This commit is contained in:
parent
c218ae4b02
commit
8a6fc529a9
6 changed files with 76 additions and 4 deletions
|
@ -949,6 +949,14 @@ private:
|
|||
return {};
|
||||
}
|
||||
|
||||
Id BranchIndirect(Operation operation) {
|
||||
const Id op_a = VisitOperand<Type::Uint>(operation, 0);
|
||||
|
||||
Emit(OpStore(jmp_to, op_a));
|
||||
BranchingOp([&]() { Emit(OpBranch(continue_label)); });
|
||||
return {};
|
||||
}
|
||||
|
||||
Id PushFlowStack(Operation operation) {
|
||||
const auto target = std::get_if<ImmediateNode>(&*operation[0]);
|
||||
ASSERT(target);
|
||||
|
@ -1334,6 +1342,7 @@ private:
|
|||
&SPIRVDecompiler::ImageStore,
|
||||
|
||||
&SPIRVDecompiler::Branch,
|
||||
&SPIRVDecompiler::BranchIndirect,
|
||||
&SPIRVDecompiler::PushFlowStack,
|
||||
&SPIRVDecompiler::PopFlowStack,
|
||||
&SPIRVDecompiler::Exit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue