diff --git a/rpcs3/Emu/RSX/Program/ProgramStateCache.cpp b/rpcs3/Emu/RSX/Program/ProgramStateCache.cpp index 2ad87c1601..afd142e747 100644 --- a/rpcs3/Emu/RSX/Program/ProgramStateCache.cpp +++ b/rpcs3/Emu/RSX/Program/ProgramStateCache.cpp @@ -142,14 +142,14 @@ vertex_program_utils::vertex_program_metadata vertex_program_utils::analyse_vert bit_set instructions_to_patch; std::pair instruction_range{ umax, 0 }; bool has_branch_instruction = false; - std::stack call_stack; + std::stack> call_stack; D3 d3{}; D2 d2{}; D1 d1{}; D0 d0{}; - std::function walk_function = [&](u32 start, bool fast_exit) + auto walk_function = [&](auto&& self, u32 start, bool fast_exit) -> void { u32 current_instruction = start; std::set conditional_targets; @@ -333,7 +333,7 @@ vertex_program_utils::vertex_program_metadata vertex_program_utils::analyse_vert { if (!result.instruction_mask[target]) { - walk_function(target, true); + self(self, target, true); } } }; @@ -346,7 +346,7 @@ vertex_program_utils::vertex_program_metadata vertex_program_utils::analyse_vert dump.close(); } - walk_function(entry, false); + walk_function(walk_function, entry, false); const u32 instruction_count = (instruction_range.second - instruction_range.first + 1); result.ucode_length = instruction_count * 16;