mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-11-18 20:04:43 +01:00
minor optimization for FIFO_control::read_put() (#6768)
This commit is contained in:
1 parent
7e08fff91d
commit
2171ffdab2
1 file changed
+11
-3
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user