diff options
Diffstat (limited to 'src/video_core/shader/track.cpp')
| -rw-r--r-- | src/video_core/shader/track.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp index 10739b37d..224943ad9 100644 --- a/src/video_core/shader/track.cpp +++ b/src/video_core/shader/track.cpp | |||
| @@ -27,8 +27,9 @@ std::pair<Node, s64> FindOperation(const NodeBlock& code, s64 cursor, | |||
| 27 | 27 | ||
| 28 | if (const auto conditional = std::get_if<ConditionalNode>(&*node)) { | 28 | if (const auto conditional = std::get_if<ConditionalNode>(&*node)) { |
| 29 | const auto& conditional_code = conditional->GetCode(); | 29 | const auto& conditional_code = conditional->GetCode(); |
| 30 | auto [found, internal_cursor] = FindOperation( | 30 | auto result = FindOperation( |
| 31 | conditional_code, static_cast<s64>(conditional_code.size() - 1), operation_code); | 31 | conditional_code, static_cast<s64>(conditional_code.size() - 1), operation_code); |
| 32 | auto& found = result.first; | ||
| 32 | if (found) { | 33 | if (found) { |
| 33 | return {std::move(found), cursor}; | 34 | return {std::move(found), cursor}; |
| 34 | } | 35 | } |
| @@ -186,8 +187,8 @@ std::tuple<Node, u32, u32> ShaderIR::TrackCbuf(Node tracked, const NodeBlock& co | |||
| 186 | std::optional<u32> ShaderIR::TrackImmediate(Node tracked, const NodeBlock& code, s64 cursor) const { | 187 | std::optional<u32> ShaderIR::TrackImmediate(Node tracked, const NodeBlock& code, s64 cursor) const { |
| 187 | // Reduce the cursor in one to avoid infinite loops when the instruction sets the same register | 188 | // Reduce the cursor in one to avoid infinite loops when the instruction sets the same register |
| 188 | // that it uses as operand | 189 | // that it uses as operand |
| 189 | const auto [found, found_cursor] = | 190 | const auto result = TrackRegister(&std::get<GprNode>(*tracked), code, cursor - 1); |
| 190 | TrackRegister(&std::get<GprNode>(*tracked), code, cursor - 1); | 191 | const auto& found = result.first; |
| 191 | if (!found) { | 192 | if (!found) { |
| 192 | return {}; | 193 | return {}; |
| 193 | } | 194 | } |