summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-12-22 16:20:55 +0100
committerGitHub <noreply@github.com>2019-12-22 16:20:55 +0100
commit27efcc15e94cb1b72e0f3ad3450e034d76b49780 (patch)
treeaa0b2285858f4e7af17eb204d70d6f2f798b5562
parentMerge pull request #3235 from ReinUsesLisp/ldg-u8 (diff)
parentvk_shader_decompiler: Use Visit instead of reimplementing it (diff)
downloadyuzu-27efcc15e94cb1b72e0f3ad3450e034d76b49780.tar
yuzu-27efcc15e94cb1b72e0f3ad3450e034d76b49780.tar.gz
yuzu-27efcc15e94cb1b72e0f3ad3450e034d76b49780.tar.bz2
yuzu-27efcc15e94cb1b72e0f3ad3450e034d76b49780.tar.lz
yuzu-27efcc15e94cb1b72e0f3ad3450e034d76b49780.tar.xz
yuzu-27efcc15e94cb1b72e0f3ad3450e034d76b49780.tar.zst
yuzu-27efcc15e94cb1b72e0f3ad3450e034d76b49780.zip
-rw-r--r--src/video_core/renderer_vulkan/vk_shader_decompiler.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
index 6227bc70b..fae8c95c8 100644
--- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
+++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
@@ -2552,29 +2552,7 @@ public:
}
Id operator()(const ExprCondCode& expr) {
- const Node cc = decomp.ir.GetConditionCode(expr.cc);
- Id target;
-
- if (const auto pred = std::get_if<PredicateNode>(&*cc)) {
- const auto index = pred->GetIndex();
- switch (index) {
- case Tegra::Shader::Pred::NeverExecute:
- target = decomp.v_false;
- break;
- case Tegra::Shader::Pred::UnusedIndex:
- target = decomp.v_true;
- break;
- default:
- target = decomp.predicates.at(index);
- break;
- }
- } else if (const auto flag = std::get_if<InternalFlagNode>(&*cc)) {
- target = decomp.internal_flags.at(static_cast<u32>(flag->GetFlag()));
- } else {
- UNREACHABLE();
- }
-
- return decomp.OpLoad(decomp.t_bool, target);
+ return decomp.AsBool(decomp.Visit(decomp.ir.GetConditionCode(expr.cc)));
}
Id operator()(const ExprVar& expr) {