mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
rsx: Avoid unnecessary memprotect syscalls
This commit is contained in:
parent
e037b5c438
commit
4a86638ce8
1 changed files with 4 additions and 1 deletions
|
@ -96,6 +96,9 @@ namespace rsx
|
||||||
tex_cache_checker.remove(locked_range, protection);
|
tex_cache_checker.remove(locked_range, protection);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Save previous state to compare for changes
|
||||||
|
const auto prev_confirmed_range = confirmed_range;
|
||||||
|
|
||||||
if (prot != utils::protection::rw)
|
if (prot != utils::protection::rw)
|
||||||
{
|
{
|
||||||
if (confirmed_range.valid())
|
if (confirmed_range.valid())
|
||||||
|
@ -113,7 +116,7 @@ namespace rsx
|
||||||
init_lockable_range(confirmed_range);
|
init_lockable_range(confirmed_range);
|
||||||
}
|
}
|
||||||
|
|
||||||
protect(prot, true);
|
protect(prot, confirmed_range != prev_confirmed_range);
|
||||||
}
|
}
|
||||||
|
|
||||||
void buffered_section::unprotect()
|
void buffered_section::unprotect()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue