summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-07-25 18:41:52 +0200
committerGitHub <noreply@github.com>2019-07-25 18:41:52 +0200
commit4d26550f5faff5e1c52fd0fb1b17e03ca4144130 (patch)
treecda37600bdeddf5c0422263f76fcfedc80159557 /src
parentMerge pull request #2689 from lioncash/tl (diff)
parentShader_Ir: Correct tracking to track from right to left (diff)
downloadyuzu-4d26550f5faff5e1c52fd0fb1b17e03ca4144130.tar
yuzu-4d26550f5faff5e1c52fd0fb1b17e03ca4144130.tar.gz
yuzu-4d26550f5faff5e1c52fd0fb1b17e03ca4144130.tar.bz2
yuzu-4d26550f5faff5e1c52fd0fb1b17e03ca4144130.tar.lz
yuzu-4d26550f5faff5e1c52fd0fb1b17e03ca4144130.tar.xz
yuzu-4d26550f5faff5e1c52fd0fb1b17e03ca4144130.tar.zst
yuzu-4d26550f5faff5e1c52fd0fb1b17e03ca4144130.zip
Diffstat (limited to 'src')
-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
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;
}