diff options
Diffstat (limited to 'src/video_core/shader/track.cpp')
| -rw-r--r-- | src/video_core/shader/track.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp index d449b625e..4db721f69 100644 --- a/src/video_core/shader/track.cpp +++ b/src/video_core/shader/track.cpp | |||
| @@ -72,8 +72,8 @@ bool AmendNodeCv(std::size_t amend_index, Node node) { | |||
| 72 | return false; | 72 | return false; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | std::tuple<Node, TrackSampler> ShaderIR::TrackSampler(Node tracked, const NodeBlock& code, | 75 | std::tuple<Node, TrackSampler> ShaderIR::TrackBindlessSampler(Node tracked, const NodeBlock& code, |
| 76 | s64 cursor) { | 76 | s64 cursor) { |
| 77 | if (const auto cbuf = std::get_if<CbufNode>(&*tracked)) { | 77 | if (const auto cbuf = std::get_if<CbufNode>(&*tracked)) { |
| 78 | // Constant buffer found, test if it's an immediate | 78 | // Constant buffer found, test if it's an immediate |
| 79 | const auto offset = cbuf->GetOffset(); | 79 | const auto offset = cbuf->GetOffset(); |
| @@ -124,11 +124,12 @@ std::tuple<Node, TrackSampler> ShaderIR::TrackSampler(Node tracked, const NodeBl | |||
| 124 | if (!source) { | 124 | if (!source) { |
| 125 | return {}; | 125 | return {}; |
| 126 | } | 126 | } |
| 127 | return TrackSampler(source, code, new_cursor); | 127 | return TrackBindlessSampler(source, code, new_cursor); |
| 128 | } | 128 | } |
| 129 | if (const auto operation = std::get_if<OperationNode>(&*tracked)) { | 129 | if (const auto operation = std::get_if<OperationNode>(&*tracked)) { |
| 130 | for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) { | 130 | for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) { |
| 131 | if (auto found = TrackSampler((*operation)[i - 1], code, cursor); std::get<0>(found)) { | 131 | if (auto found = TrackBindlessSampler((*operation)[i - 1], code, cursor); |
| 132 | std::get<0>(found)) { | ||
| 132 | // Cbuf found in operand. | 133 | // Cbuf found in operand. |
| 133 | return found; | 134 | return found; |
| 134 | } | 135 | } |
| @@ -137,7 +138,8 @@ std::tuple<Node, TrackSampler> ShaderIR::TrackSampler(Node tracked, const NodeBl | |||
| 137 | } | 138 | } |
| 138 | if (const auto conditional = std::get_if<ConditionalNode>(&*tracked)) { | 139 | if (const auto conditional = std::get_if<ConditionalNode>(&*tracked)) { |
| 139 | const auto& conditional_code = conditional->GetCode(); | 140 | const auto& conditional_code = conditional->GetCode(); |
| 140 | return TrackSampler(tracked, conditional_code, static_cast<s64>(conditional_code.size())); | 141 | return TrackBindlessSampler(tracked, conditional_code, |
| 142 | static_cast<s64>(conditional_code.size())); | ||
| 141 | } | 143 | } |
| 142 | return {}; | 144 | return {}; |
| 143 | } | 145 | } |