summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-07-15 21:46:35 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-07-16 21:06:59 +0200
commitd614193e494c640cab078f8a4747764052b58bb3 (patch)
treeeb4afce3e44bc38913c32488b6be1fac8609ad27
parentMerge pull request #2565 from ReinUsesLisp/track-indirect (diff)
downloadyuzu-d614193e494c640cab078f8a4747764052b58bb3.tar
yuzu-d614193e494c640cab078f8a4747764052b58bb3.tar.gz
yuzu-d614193e494c640cab078f8a4747764052b58bb3.tar.bz2
yuzu-d614193e494c640cab078f8a4747764052b58bb3.tar.lz
yuzu-d614193e494c640cab078f8a4747764052b58bb3.tar.xz
yuzu-d614193e494c640cab078f8a4747764052b58bb3.tar.zst
yuzu-d614193e494c640cab078f8a4747764052b58bb3.zip
-rw-r--r--src/video_core/shader/track.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp
index dc132a4a3..92ff2423e 100644
--- a/src/video_core/shader/track.cpp
+++ b/src/video_core/shader/track.cpp
@@ -57,8 +57,8 @@ std::tuple<Node, u32, u32> ShaderIR::TrackCbuf(Node tracked, const NodeBlock& co
return TrackCbuf(source, code, new_cursor);
}
if (const auto operation = std::get_if<OperationNode>(&*tracked)) {
- for (std::size_t i = 0; i < operation->GetOperandsCount(); ++i) {
- if (auto found = TrackCbuf((*operation)[i], code, cursor); std::get<0>(found)) {
+ for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) {
+ if (auto found = TrackCbuf((*operation)[i - 1], code, cursor); std::get<0>(found)) {
// Cbuf found in operand.
return found;
}