Debugger/RSX: Add FP/VP hash of current shader

This commit is contained in:
Eladash 2023-06-24 16:56:49 +03:00 committed by Elad Ashkenazi
parent 454cb69700
commit cd98e84ca5
3 changed files with 25 additions and 0 deletions

View File

@ -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)

View File

@ -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<std::pair<u32, u32>> thread::dump_callstack_list() const
{
std::vector<std::pair<u32, u32>> result;

View File

@ -173,6 +173,7 @@ namespace rsx
std::unique_ptr<FIFO::FIFO_control> fifo_ctrl;
atomic_t<bool> rsx_thread_running{ false };
std::vector<std::pair<u32, u32>> dump_callstack_list() const override;
std::string dump_misc() const override;
protected:
FIFO::flattening_helper m_flattener;