diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-19 05:46:20 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-19 20:24:45 +0100 |
commit | 2a63b3bdb920a48a341f624361730f5c148fafe7 (patch) | |
tree | 669654cbe0fea367e02d8766be79b9f6ccac666c /src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | |
parent | vk_shader_decompiler: Skip NDC correction when it is native (diff) | |
download | yuzu-2a63b3bdb920a48a341f624361730f5c148fafe7.tar yuzu-2a63b3bdb920a48a341f624361730f5c148fafe7.tar.gz yuzu-2a63b3bdb920a48a341f624361730f5c148fafe7.tar.bz2 yuzu-2a63b3bdb920a48a341f624361730f5c148fafe7.tar.lz yuzu-2a63b3bdb920a48a341f624361730f5c148fafe7.tar.xz yuzu-2a63b3bdb920a48a341f624361730f5c148fafe7.tar.zst yuzu-2a63b3bdb920a48a341f624361730f5c148fafe7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index 6c7f73d48..833145971 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp @@ -2594,7 +2594,7 @@ public: const Id target = decomp.Constant(decomp.t_uint, expr.value); Id gpr = decomp.OpLoad(decomp.t_float, decomp.registers.at(expr.gpr)); gpr = decomp.OpBitcast(decomp.t_uint, gpr); - return decomp.OpLogicalEqual(decomp.t_uint, gpr, target); + return decomp.OpIEqual(decomp.t_bool, gpr, target); } Id Visit(const Expr& node) { @@ -2664,11 +2664,11 @@ public: const Id loop_label = decomp.OpLabel(); const Id endloop_label = decomp.OpLabel(); const Id loop_start_block = decomp.OpLabel(); - const Id loop_end_block = decomp.OpLabel(); + const Id loop_continue_block = decomp.OpLabel(); current_loop_exit = endloop_label; decomp.OpBranch(loop_label); decomp.AddLabel(loop_label); - decomp.OpLoopMerge(endloop_label, loop_end_block, spv::LoopControlMask::MaskNone); + decomp.OpLoopMerge(endloop_label, loop_continue_block, spv::LoopControlMask::MaskNone); decomp.OpBranch(loop_start_block); decomp.AddLabel(loop_start_block); ASTNode current = ast.nodes.GetFirst(); @@ -2676,6 +2676,8 @@ public: Visit(current); current = current->GetNext(); } + decomp.OpBranch(loop_continue_block); + decomp.AddLabel(loop_continue_block); ExprDecompiler expr_parser{decomp}; const Id condition = expr_parser.Visit(ast.condition); decomp.OpBranchConditional(condition, loop_label, endloop_label); |