minor optimization for FIFO_control::read_put() (#6768)
This commit is contained in:
@@ -31,17 +31,25 @@ 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)
|
||||||
{
|
{
|
||||||
return m_ctrl->put & ~3;
|
return m_ctrl->put & ~3;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
u32 put = m_ctrl->put;
|
||||||
|
if (LIKELY((put & 3) == 0))
|
||||||
|
{
|
||||||
|
return put;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return m_ctrl->put.and_fetch(~3);
|
return m_ctrl->put.and_fetch(~3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FIFO_control::set_put(u32 put)
|
void FIFO_control::set_put(u32 put)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user