mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 03:08:36 +12: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>
|
template <bool full>
|
||||||
u32 FIFO_control::read_put()
|
inline u32 FIFO_control::read_put()
|
||||||
{
|
{
|
||||||
if constexpr (!full)
|
if constexpr (!full)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,15 @@ namespace rsx
|
||||||
}
|
}
|
||||||
else
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue