diff options
| author | 2019-07-15 15:46:35 -0400 | |
|---|---|---|
| committer | 2019-07-16 15:06:59 -0400 | |
| commit | d614193e494c640cab078f8a4747764052b58bb3 (patch) | |
| tree | eb4afce3e44bc38913c32488b6be1fac8609ad27 | |
| parent | Merge pull request #2565 from ReinUsesLisp/track-indirect (diff) | |
| download | yuzu-d614193e494c640cab078f8a4747764052b58bb3.tar.gz yuzu-d614193e494c640cab078f8a4747764052b58bb3.tar.xz yuzu-d614193e494c640cab078f8a4747764052b58bb3.zip | |
Shader_Ir: Correct tracking to track from right to left
| -rw-r--r-- | src/video_core/shader/track.cpp | 4 |
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 | |||
| 57 | return TrackCbuf(source, code, new_cursor); | 57 | return TrackCbuf(source, code, new_cursor); |
| 58 | } | 58 | } |
| 59 | if (const auto operation = std::get_if<OperationNode>(&*tracked)) { | 59 | if (const auto operation = std::get_if<OperationNode>(&*tracked)) { |
| 60 | for (std::size_t i = 0; i < operation->GetOperandsCount(); ++i) { | 60 | for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) { |
| 61 | if (auto found = TrackCbuf((*operation)[i], code, cursor); std::get<0>(found)) { | 61 | if (auto found = TrackCbuf((*operation)[i - 1], code, cursor); std::get<0>(found)) { |
| 62 | // Cbuf found in operand. | 62 | // Cbuf found in operand. |
| 63 | return found; | 63 | return found; |
| 64 | } | 64 | } |