diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-01-24 15:44:34 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-01-25 14:04:59 +0100 |
commit | bb8eb15d392d69693f8cda0427669d011e23db97 (patch) | |
tree | cebd080530de75e7b5400f46c25c307a80e3c222 /src/video_core/shader/track.cpp | |
parent | Shader_IR: Change name of TrackSampler function so it does not confuse with the type. (diff) | |
download | yuzu-bb8eb15d392d69693f8cda0427669d011e23db97.tar yuzu-bb8eb15d392d69693f8cda0427669d011e23db97.tar.gz yuzu-bb8eb15d392d69693f8cda0427669d011e23db97.tar.bz2 yuzu-bb8eb15d392d69693f8cda0427669d011e23db97.tar.lz yuzu-bb8eb15d392d69693f8cda0427669d011e23db97.tar.xz yuzu-bb8eb15d392d69693f8cda0427669d011e23db97.tar.zst yuzu-bb8eb15d392d69693f8cda0427669d011e23db97.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/shader/track.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp index 4db721f69..ea39bca54 100644 --- a/src/video_core/shader/track.cpp +++ b/src/video_core/shader/track.cpp @@ -36,7 +36,6 @@ std::pair<Node, s64> FindOperation(const NodeBlock& code, s64 cursor, } return {}; } -} // Anonymous namespace std::optional<std::pair<Node, Node>> DecoupleIndirectRead(const OperationNode& operation) { if (operation.GetCode() != OperationCode::UAdd) { @@ -44,9 +43,7 @@ std::optional<std::pair<Node, Node>> DecoupleIndirectRead(const OperationNode& o } Node gpr{}; Node offset{}; - if (operation.GetOperandsCount() != 2) { - return std::nullopt; - } + ASSERT(operation.GetOperandsCount() == 2); for (std::size_t i = 0; i < operation.GetOperandsCount(); i++) { Node operand = operation[i]; if (std::holds_alternative<ImmediateNode>(*operand)) { @@ -56,7 +53,7 @@ std::optional<std::pair<Node, Node>> DecoupleIndirectRead(const OperationNode& o } } if (offset && gpr) { - return {std::make_pair(gpr, offset)}; + return std::make_pair(gpr, offset); } return std::nullopt; } @@ -72,6 +69,8 @@ bool AmendNodeCv(std::size_t amend_index, Node node) { return false; } +} // Anonymous namespace + std::tuple<Node, TrackSampler> ShaderIR::TrackBindlessSampler(Node tracked, const NodeBlock& code, s64 cursor) { if (const auto cbuf = std::get_if<CbufNode>(&*tracked)) { |