summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 a53e02253..55f5949e4 100644
--- a/src/video_core/shader/track.cpp
+++ b/src/video_core/shader/track.cpp
@@ -59,8 +59,8 @@ std::tuple<Node, u32, u32> ShaderIR::TrackCbuf(Node tracked, const NodeBlock& co
59 return TrackCbuf(source, code, new_cursor); 59 return TrackCbuf(source, code, new_cursor);
60 } 60 }
61 if (const auto operation = std::get_if<OperationNode>(&*tracked)) { 61 if (const auto operation = std::get_if<OperationNode>(&*tracked)) {
62 for (std::size_t i = 0; i < operation->GetOperandsCount(); ++i) { 62 for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) {
63 if (auto found = TrackCbuf((*operation)[i], code, cursor); std::get<0>(found)) { 63 if (auto found = TrackCbuf((*operation)[i - 1], code, cursor); std::get<0>(found)) {
64 // Cbuf found in operand. 64 // Cbuf found in operand.
65 return found; 65 return found;
66 } 66 }