diff options
| author | 2021-05-14 22:01:01 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:31 -0400 | |
| commit | ab5dbe7c299d904e36099d209b7290e538a84745 (patch) | |
| tree | d2e9642670d5839f75f091a3bf932a495b7750dc /src/shader_recompiler/backend/spirv/emit_spirv.cpp | |
| parent | glasm: Initial implementation of phi nodes on GLASM (diff) | |
| download | yuzu-ab5dbe7c299d904e36099d209b7290e538a84745.tar.gz yuzu-ab5dbe7c299d904e36099d209b7290e538a84745.tar.xz yuzu-ab5dbe7c299d904e36099d209b7290e538a84745.zip | |
emit_spirv: Add missing block in case
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index 7bf8c78de..266ac690c 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp | |||
| @@ -111,7 +111,7 @@ void Traverse(EmitContext& ctx, IR::Program& program) { | |||
| 111 | IR::Block* current_block{}; | 111 | IR::Block* current_block{}; |
| 112 | for (const IR::AbstractSyntaxNode& node : program.syntax_list) { | 112 | for (const IR::AbstractSyntaxNode& node : program.syntax_list) { |
| 113 | switch (node.type) { | 113 | switch (node.type) { |
| 114 | case IR::AbstractSyntaxNode::Type::Block: | 114 | case IR::AbstractSyntaxNode::Type::Block: { |
| 115 | const Id label{node.block->Definition<Id>()}; | 115 | const Id label{node.block->Definition<Id>()}; |
| 116 | if (current_block) { | 116 | if (current_block) { |
| 117 | ctx.OpBranch(label); | 117 | ctx.OpBranch(label); |
| @@ -122,6 +122,7 @@ void Traverse(EmitContext& ctx, IR::Program& program) { | |||
| 122 | EmitInst(ctx, &inst); | 122 | EmitInst(ctx, &inst); |
| 123 | } | 123 | } |
| 124 | break; | 124 | break; |
| 125 | } | ||
| 125 | case IR::AbstractSyntaxNode::Type::If: { | 126 | case IR::AbstractSyntaxNode::Type::If: { |
| 126 | const Id if_label{node.if_node.body->Definition<Id>()}; | 127 | const Id if_label{node.if_node.body->Definition<Id>()}; |
| 127 | const Id endif_label{node.if_node.merge->Definition<Id>()}; | 128 | const Id endif_label{node.if_node.merge->Definition<Id>()}; |