mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
fixup - Improve invalidated region checks for performance
This commit is contained in:
parent
b030d1900c
commit
493d4e8613
1 changed files with 9 additions and 6 deletions
|
@ -1280,14 +1280,17 @@ namespace rsx
|
|||
{
|
||||
if (!in_begin_end)
|
||||
{
|
||||
reader_lock lock(m_mtx_task);
|
||||
for (const auto& range : m_invalidated_memory_ranges)
|
||||
if (!m_invalidated_memory_ranges.empty())
|
||||
{
|
||||
on_invalidate_memory_range(range.first, range.second);
|
||||
}
|
||||
writer_lock lock(m_mtx_task);
|
||||
|
||||
lock.upgrade();
|
||||
m_invalidated_memory_ranges.clear();
|
||||
for (const auto& range : m_invalidated_memory_ranges)
|
||||
{
|
||||
on_invalidate_memory_range(range.first, range.second);
|
||||
}
|
||||
|
||||
m_invalidated_memory_ranges.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue