mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
minor optimization for FIFO_control::read_put() (#6768)
This commit is contained in:
parent
7e08fff91d
commit
2171ffdab2
1 changed files with 11 additions and 3 deletions
|
@ -31,7 +31,7 @@ namespace rsx
|
|||
}
|
||||
|
||||
template <bool full>
|
||||
u32 FIFO_control::read_put()
|
||||
inline u32 FIFO_control::read_put()
|
||||
{
|
||||
if constexpr (!full)
|
||||
{
|
||||
|
@ -39,7 +39,15 @@ namespace rsx
|
|||
}
|
||||
else
|
||||
{
|
||||
return m_ctrl->put.and_fetch(~3);
|
||||
u32 put = m_ctrl->put;
|
||||
if (LIKELY((put & 3) == 0))
|
||||
{
|
||||
return put;
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_ctrl->put.and_fetch(~3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -578,4 +586,4 @@ namespace rsx
|
|||
|
||||
fifo_ctrl->sync_get();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue