summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-30 06:20:05 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-02-03 21:21:20 +0100
commit0d1d755086f95fb20975fe2a4fd6c9c9de43789b (patch)
tree7d60ff631153b866580d73f7dfc4c495694c319c /src
parentshader_ir: Rename BasicBlock to NodeBlock (diff)
downloadyuzu-0d1d755086f95fb20975fe2a4fd6c9c9de43789b.tar
yuzu-0d1d755086f95fb20975fe2a4fd6c9c9de43789b.tar.gz
yuzu-0d1d755086f95fb20975fe2a4fd6c9c9de43789b.tar.bz2
yuzu-0d1d755086f95fb20975fe2a4fd6c9c9de43789b.tar.lz
yuzu-0d1d755086f95fb20975fe2a4fd6c9c9de43789b.tar.xz
yuzu-0d1d755086f95fb20975fe2a4fd6c9c9de43789b.tar.zst
yuzu-0d1d755086f95fb20975fe2a4fd6c9c9de43789b.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/shader/track.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp
index 343c129c7..be4635342 100644
--- a/src/video_core/shader/track.cpp
+++ b/src/video_core/shader/track.cpp
@@ -19,6 +19,13 @@ std::pair<Node, s64> FindOperation(const NodeBlock& code, s64 cursor,
if (operation->GetCode() == operation_code)
return {node, cursor};
}
+ if (const auto conditional = std::get_if<ConditionalNode>(node)) {
+ const auto& code = conditional->GetCode();
+ const auto [found, internal_cursor] =
+ FindOperation(code, static_cast<s64>(code.size() - 1), operation_code);
+ if (found)
+ return {found, cursor};
+ }
}
return {};
}
@@ -50,6 +57,10 @@ Node ShaderIR::TrackCbuf(Node tracked, const NodeBlock& code, s64 cursor) {
}
return nullptr;
}
+ if (const auto conditional = std::get_if<ConditionalNode>(tracked)) {
+ const auto& code = conditional->GetCode();
+ return TrackCbuf(tracked, code, static_cast<s64>(code.size()));
+ }
return nullptr;
}