summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/shader/control_flow.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/shader/control_flow.cpp b/src/video_core/shader/control_flow.cpp
index 278de4084..7e6364d94 100644
--- a/src/video_core/shader/control_flow.cpp
+++ b/src/video_core/shader/control_flow.cpp
@@ -2,7 +2,6 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <functional>
6#include <list> 5#include <list>
7#include <map> 6#include <map>
8#include <set> 7#include <set>
@@ -157,11 +156,11 @@ std::optional<std::pair<s32, u64>> GetBRXInfo(const CFGRebuildState& state, u32&
157 return std::make_pair(instr.brx.GetBranchExtend(), instr.gpr8.Value()); 156 return std::make_pair(instr.brx.GetBranchExtend(), instr.gpr8.Value());
158} 157}
159 158
160template <typename Result> 159template <typename Result, typename TestCallable, typename PackCallable>
161std::optional<Result> TrackInstruction( 160// requires std::predicate<TestCallable, Instruction, const OpCode::Matcher&>
162 const CFGRebuildState& state, u32& pos, 161// requires std::invocable<PackCallable, Instruction, const OpCode::Matcher&>
163 std::function<bool(Instruction, const OpCode::Matcher&)>&& test, 162std::optional<Result> TrackInstruction(const CFGRebuildState& state, u32& pos, TestCallable test,
164 std::function<Result(Instruction, const OpCode::Matcher&)>&& pack) { 163 PackCallable pack) {
165 for (; pos >= state.start; --pos) { 164 for (; pos >= state.start; --pos) {
166 if (IsSchedInstruction(pos, state.start)) { 165 if (IsSchedInstruction(pos, state.start)) {
167 continue; 166 continue;