diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 0354da63a8..f8b13425c6 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1661,6 +1661,11 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe } } + if (cpu) + { + cpu->state += cpu_flag::wait; + } + Emu.Pause(true); if (!g_tls_access_violation_recovered) diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index c5f2e90161..d480b93387 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -3089,6 +3089,25 @@ namespace rsx recovered_fifo_cmds_history.push({fifo_ctrl->last_cmd(), current_time}); } + std::string thread::dump_misc() const + { + std::string ret = cpu_thread::dump_misc(); + + const auto flags = +state; + + if (is_paused(flags) && flags & cpu_flag::wait) + { + fmt::append(ret, "\nFragment Program Hash: %X.fp", current_fragment_program.get_data() ? program_hash_util::fragment_program_utils::get_fragment_program_ucode_hash(current_fragment_program) : 0); + fmt::append(ret, "\nVertex Program Hash: %X.vp", current_vertex_program.data.empty() ? 0 : program_hash_util::vertex_program_utils::get_vertex_program_ucode_hash(current_vertex_program)); + } + else + { + fmt::append(ret, "\n"); + } + + return ret; + } + std::vector> thread::dump_callstack_list() const { std::vector> result; diff --git a/rpcs3/Emu/RSX/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h index ae91c502a0..18306cc4cf 100644 --- a/rpcs3/Emu/RSX/RSXThread.h +++ b/rpcs3/Emu/RSX/RSXThread.h @@ -173,6 +173,7 @@ namespace rsx std::unique_ptr fifo_ctrl; atomic_t rsx_thread_running{ false }; std::vector> dump_callstack_list() const override; + std::string dump_misc() const override; protected: FIFO::flattening_helper m_flattener;