diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-05-16 23:06:13 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:31 +0200 |
commit | f7a2340205b4fa2db32403f20d7b7afe32b15f33 (patch) | |
tree | 22059632c5f3bf068e686997d833368f6c22f6ec /src/shader_recompiler/backend/spirv | |
parent | glasm: Implement rest of shared mem (diff) | |
download | yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.gz yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.bz2 yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.lz yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.xz yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.zst yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.zip |
Diffstat (limited to 'src/shader_recompiler/backend/spirv')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index 881a5dc4c..9ed2af991 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp @@ -112,48 +112,48 @@ void Traverse(EmitContext& ctx, IR::Program& program) { for (const IR::AbstractSyntaxNode& node : program.syntax_list) { switch (node.type) { case IR::AbstractSyntaxNode::Type::Block: { - const Id label{node.block->Definition<Id>()}; + const Id label{node.data.block->Definition<Id>()}; if (current_block) { ctx.OpBranch(label); } - current_block = node.block; + current_block = node.data.block; ctx.AddLabel(label); - for (IR::Inst& inst : node.block->Instructions()) { + for (IR::Inst& inst : node.data.block->Instructions()) { EmitInst(ctx, &inst); } break; } case IR::AbstractSyntaxNode::Type::If: { - const Id if_label{node.if_node.body->Definition<Id>()}; - const Id endif_label{node.if_node.merge->Definition<Id>()}; + const Id if_label{node.data.if_node.body->Definition<Id>()}; + const Id endif_label{node.data.if_node.merge->Definition<Id>()}; ctx.OpSelectionMerge(endif_label, spv::SelectionControlMask::MaskNone); - ctx.OpBranchConditional(ctx.Def(node.if_node.cond), if_label, endif_label); + ctx.OpBranchConditional(ctx.Def(node.data.if_node.cond), if_label, endif_label); break; } case IR::AbstractSyntaxNode::Type::Loop: { - const Id body_label{node.loop.body->Definition<Id>()}; - const Id continue_label{node.loop.continue_block->Definition<Id>()}; - const Id endloop_label{node.loop.merge->Definition<Id>()}; + const Id body_label{node.data.loop.body->Definition<Id>()}; + const Id continue_label{node.data.loop.continue_block->Definition<Id>()}; + const Id endloop_label{node.data.loop.merge->Definition<Id>()}; ctx.OpLoopMerge(endloop_label, continue_label, spv::LoopControlMask::MaskNone); ctx.OpBranch(body_label); break; } case IR::AbstractSyntaxNode::Type::Break: { - const Id break_label{node.break_node.merge->Definition<Id>()}; - const Id skip_label{node.break_node.skip->Definition<Id>()}; - ctx.OpBranchConditional(ctx.Def(node.break_node.cond), break_label, skip_label); + const Id break_label{node.data.break_node.merge->Definition<Id>()}; + const Id skip_label{node.data.break_node.skip->Definition<Id>()}; + ctx.OpBranchConditional(ctx.Def(node.data.break_node.cond), break_label, skip_label); break; } case IR::AbstractSyntaxNode::Type::EndIf: if (current_block) { - ctx.OpBranch(node.end_if.merge->Definition<Id>()); + ctx.OpBranch(node.data.end_if.merge->Definition<Id>()); } break; case IR::AbstractSyntaxNode::Type::Repeat: { - const Id loop_header_label{node.repeat.loop_header->Definition<Id>()}; - const Id merge_label{node.repeat.merge->Definition<Id>()}; - ctx.OpBranchConditional(ctx.Def(node.repeat.cond), loop_header_label, merge_label); + const Id loop_header_label{node.data.repeat.loop_header->Definition<Id>()}; + const Id merge_label{node.data.repeat.merge->Definition<Id>()}; + ctx.OpBranchConditional(ctx.Def(node.data.repeat.cond), loop_header_label, merge_label); break; } case IR::AbstractSyntaxNode::Type::Return: |