Use g_fxo for rsx::thread

This commit is contained in:
Nekotekina 2019-09-26 18:32:31 +03:00
parent b48cdc2260
commit 5f9c5e8765
8 changed files with 42 additions and 35 deletions

View file

@ -346,7 +346,7 @@ namespace vm
// Notify rsx that range has become valid
// Note: This must be done *before* memory gets mapped while holding the vm lock, otherwise
// the RSX might try to invalidate memory that got unmapped and remapped
if (const auto rsxthr = fxm::check_unlocked<GSRender>())
if (const auto rsxthr = g_fxo->get<rsx::thread>())
{
rsxthr->on_notify_memory_mapped(addr, size);
}
@ -483,7 +483,7 @@ namespace vm
// Notify rsx to invalidate range
// Note: This must be done *before* memory gets unmapped while holding the vm lock, otherwise
// the RSX might try to call VirtualProtect on memory that is already unmapped
if (const auto rsxthr = fxm::check_unlocked<GSRender>())
if (const auto rsxthr = g_fxo->get<rsx::thread>())
{
rsxthr->on_notify_memory_unmapped(addr, size);
}