minor optimization for FIFO_control::read_put() (#6768)

This commit is contained in:
plappermaul 2019-10-14 20:26:31 +02:00 committed by kd-11
parent 7e08fff91d
commit 2171ffdab2

View file

@ -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();
}
}
}