mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
rsx: Fix pfifo nop cmd
This commit is contained in:
parent
306f95a9ae
commit
a47ebad24c
1 changed files with 15 additions and 12 deletions
|
@ -698,6 +698,16 @@ namespace rsx
|
||||||
m_return_addr = std::exchange(internal_get.raw(), offs) + 4;
|
m_return_addr = std::exchange(internal_get.raw(), offs) + 4;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cmd & 0x3)
|
||||||
|
{
|
||||||
|
// TODO: Check for more invalid bits combinations
|
||||||
|
LOG_ERROR(RSX, "FIFO: Illegal command(0x%x) was executed. Resetting...", cmd);
|
||||||
|
internal_get = restore_point.load();
|
||||||
|
m_return_addr = restore_ret_addr;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (cmd == RSX_METHOD_RETURN_CMD)
|
if (cmd == RSX_METHOD_RETURN_CMD)
|
||||||
{
|
{
|
||||||
if (m_return_addr == -1)
|
if (m_return_addr == -1)
|
||||||
|
@ -712,7 +722,10 @@ namespace rsx
|
||||||
internal_get = get;
|
internal_get = get;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cmd == 0) //nop
|
|
||||||
|
u32 count = (cmd >> 18) & 0x7ff;
|
||||||
|
|
||||||
|
if (count == 0) //nop
|
||||||
{
|
{
|
||||||
if (performance_counters.state == FIFO_state::running)
|
if (performance_counters.state == FIFO_state::running)
|
||||||
{
|
{
|
||||||
|
@ -723,21 +736,11 @@ namespace rsx
|
||||||
internal_get += 4;
|
internal_get += 4;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cmd & 0x3)
|
|
||||||
{
|
|
||||||
// TODO: Check for more invalid bits combinations
|
|
||||||
LOG_ERROR(RSX, "FIFO: Illegal command(0x%x) was executed. Resetting...", cmd);
|
|
||||||
internal_get = restore_point.load();
|
|
||||||
m_return_addr = restore_ret_addr;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
u32 count = (cmd >> 18) & 0x7ff;
|
|
||||||
|
|
||||||
//Validate the args ptr if the command attempts to read from it
|
//Validate the args ptr if the command attempts to read from it
|
||||||
auto args = vm::ptr<u32>::make(RSXIOMem.RealAddr(internal_get + 4));
|
auto args = vm::ptr<u32>::make(RSXIOMem.RealAddr(internal_get + 4));
|
||||||
|
|
||||||
if (!args && count)
|
if (!args)
|
||||||
{
|
{
|
||||||
std::this_thread::sleep_for(33ms);
|
std::this_thread::sleep_for(33ms);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue