diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/track.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp index 343c129c7..be4635342 100644 --- a/src/video_core/shader/track.cpp +++ b/src/video_core/shader/track.cpp | |||
| @@ -19,6 +19,13 @@ std::pair<Node, s64> FindOperation(const NodeBlock& code, s64 cursor, | |||
| 19 | if (operation->GetCode() == operation_code) | 19 | if (operation->GetCode() == operation_code) |
| 20 | return {node, cursor}; | 20 | return {node, cursor}; |
| 21 | } | 21 | } |
| 22 | if (const auto conditional = std::get_if<ConditionalNode>(node)) { | ||
| 23 | const auto& code = conditional->GetCode(); | ||
| 24 | const auto [found, internal_cursor] = | ||
| 25 | FindOperation(code, static_cast<s64>(code.size() - 1), operation_code); | ||
| 26 | if (found) | ||
| 27 | return {found, cursor}; | ||
| 28 | } | ||
| 22 | } | 29 | } |
| 23 | return {}; | 30 | return {}; |
| 24 | } | 31 | } |
| @@ -50,6 +57,10 @@ Node ShaderIR::TrackCbuf(Node tracked, const NodeBlock& code, s64 cursor) { | |||
| 50 | } | 57 | } |
| 51 | return nullptr; | 58 | return nullptr; |
| 52 | } | 59 | } |
| 60 | if (const auto conditional = std::get_if<ConditionalNode>(tracked)) { | ||
| 61 | const auto& code = conditional->GetCode(); | ||
| 62 | return TrackCbuf(tracked, code, static_cast<s64>(code.size())); | ||
| 63 | } | ||
| 53 | return nullptr; | 64 | return nullptr; |
| 54 | } | 65 | } |
| 55 | 66 | ||