mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-28 23:13:00 +00:00
emit_spirv: Add missing block in case
This commit is contained in:
parent
bf5e48ffe4
commit
ab5dbe7c29
|
@ -111,7 +111,7 @@ void Traverse(EmitContext& ctx, IR::Program& program) {
|
||||||
IR::Block* current_block{};
|
IR::Block* current_block{};
|
||||||
for (const IR::AbstractSyntaxNode& node : program.syntax_list) {
|
for (const IR::AbstractSyntaxNode& node : program.syntax_list) {
|
||||||
switch (node.type) {
|
switch (node.type) {
|
||||||
case IR::AbstractSyntaxNode::Type::Block:
|
case IR::AbstractSyntaxNode::Type::Block: {
|
||||||
const Id label{node.block->Definition<Id>()};
|
const Id label{node.block->Definition<Id>()};
|
||||||
if (current_block) {
|
if (current_block) {
|
||||||
ctx.OpBranch(label);
|
ctx.OpBranch(label);
|
||||||
|
@ -122,6 +122,7 @@ void Traverse(EmitContext& ctx, IR::Program& program) {
|
||||||
EmitInst(ctx, &inst);
|
EmitInst(ctx, &inst);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case IR::AbstractSyntaxNode::Type::If: {
|
case IR::AbstractSyntaxNode::Type::If: {
|
||||||
const Id if_label{node.if_node.body->Definition<Id>()};
|
const Id if_label{node.if_node.body->Definition<Id>()};
|
||||||
const Id endif_label{node.if_node.merge->Definition<Id>()};
|
const Id endif_label{node.if_node.merge->Definition<Id>()};
|
||||||
|
|
Loading…
Reference in a new issue