rsx: Debug commit

This commit is contained in:
Elad committed 2026-10-02 04:56:21 +03:00
1 parent 0497373577
commit 078eaa2930
4 files changed
+13 -4

No files matched your search

+3
View File
@@ -35,6 +35,9 @@ namespace rsx
const auto& sema = vm::_ref<RsxSemaphore>(addr);
const auto& atomic_sema = vm::_ref<atomic_t<RsxSemaphore>>(addr);
RSX(ctx)->last_sema_cmd = RSX(ctx)->fifo_ctrl->get_pos() - 4;
RSX(ctx)->last_sema_addr = addr;
if (sema == arg)
{
// Flip semaphore doesnt need wake-up delay
+3 -1
View File
@@ -222,6 +222,8 @@ namespace rsx
{
invalidate_cache();
m_thread->last_code_jump = m_fifo_pos;
if (spin_cmd && m_fifo_pos == get)
{
m_memwatch_addr = get;
@@ -777,7 +779,7 @@ namespace rsx
}
fifo_ctrl->set_get(std::exchange(fifo_ret_addr, RSX_CALL_STACK_EMPTY));
last_known_code_start = ctrl->get;
last_known_code_start = fifo_ctrl->get_pos();
return;
}
+4 -3
View File
@@ -2880,9 +2880,8 @@ namespace rsx
void thread::flush_fifo()
{
// Make sure GET value is exposed before sync points
fifo_ctrl->sync_get();
fifo_ctrl->invalidate_cache();
fifo_ctrl->fetch_u32(fifo_ctrl->get_pos());
}
std::pair<u32, u32> thread::try_get_pc_of_x_cmds_backwards(s32 count, u32 get) const
@@ -2974,7 +2973,7 @@ namespace rsx
void thread::recover_fifo(std::source_location src_loc)
{
bool kill_itself = g_cfg.core.rsx_fifo_accuracy == rsx_fifo_mode::as_ps3;
bool kill_itself = g_cfg.core.rsx_fifo_accuracy >= rsx_fifo_mode::atomic;
const u64 current_time = get_system_time();
@@ -3111,6 +3110,8 @@ namespace rsx
if (ctrl)
{
fmt::append(result, "FIFO: GET=0x%07x, PUT=0x%07x, REF=0x%08x\n", +ctrl->get, +ctrl->put, +ctrl->ref);
fmt::append(result, "FIFO: RET-ADDR=0x%x, Code=0x%x, Jump=0x%x\n", fifo_ret_addr, last_known_code_start, last_code_jump);
fmt::append(result, "FIFO: Semaphore Acquire: pos=0x%x, address=0x%x\n", last_sema_cmd, last_sema_addr);
}
for (u32 i = 0; i < 1 << 14; i++)
+3
View File
@@ -176,6 +176,9 @@ namespace rsx
u32 restore_point = 0;
u32 dbg_step_pc = 0;
u32 last_known_code_start = 0;
u32 last_code_jump = 0;
u32 last_sema_cmd = 0;
u32 last_sema_addr = 0;
atomic_t<u32> external_interrupt_lock{ 0 };
atomic_t<bool> external_interrupt_ack{ false };
atomic_t<u32> is_initialized{0};